From 44afd7428a959fec7d4dd82db6a5627cc07cc2f8 Mon Sep 17 00:00:00 2001 From: wangbiao Date: Tue, 21 Nov 2023 14:49:08 +0900 Subject: [PATCH] use the correct lua to excutxe scripts Change-Id: I8ff682592f8f1c0b4c0615493f8df49a5aad7010 Signed-off-by: wangbiao --- build-pkg-rpm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-pkg-rpm b/build-pkg-rpm index 607edf7..722079f 100644 --- a/build-pkg-rpm +++ b/build-pkg-rpm @@ -208,6 +208,9 @@ pkg_runscripts_rpm() { echo "running $PKG preinstall script" local prog read prog < "$BUILD_ROOT/.init_b_cache/scripts/$PKG.preprog" + if test "$prog" = "" ; then + prog="/usr/bin/lua" + fi (cd $BUILD_ROOT && chroot $BUILD_ROOT "${prog:-sh}" ".init_b_cache/scripts/$PKG.pre" 0) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" "$BUILD_ROOT/.init_b_cache/scripts/$PKG.preprog" fi @@ -215,6 +218,9 @@ pkg_runscripts_rpm() { echo "running $PKG postinstall script" local prog read prog < "$BUILD_ROOT/.init_b_cache/scripts/$PKG.postprog" + if test "$prog" = "" ; then + prog="/usr/bin/lua" + fi (cd $BUILD_ROOT && chroot $BUILD_ROOT "${prog:-sh}" ".init_b_cache/scripts/$PKG.post" 1) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" "$BUILD_ROOT/.init_b_cache/scripts/$PKG.postprog" fi -- 2.7.4