Compare commits

...

2 Commits

Author SHA1 Message Date
2b311fe7ef fix: Can not use sudo when root
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-03-30 06:48:13 +00:00
97726bebf8 update src/DEBIAN/postinst.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-03-29 11:50:42 +00:00
2 changed files with 7 additions and 4 deletions

View File

@@ -3,12 +3,11 @@ export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then
if [ "$(arch)" != "loongarch64" ];then
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env
ln -sfv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ln -sfv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env
else
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/amber-ce-loongnix/files/ace-env
fi
fi fi
fi fi

View File

@@ -17,6 +17,10 @@ fi
printf "\"%s\" ALL = (root) NOPASSWD:ALL\n" "${container_user_name}" >> /etc/sudoers.d/sudoers printf "\"%s\" ALL = (root) NOPASSWD:ALL\n" "${container_user_name}" >> /etc/sudoers.d/sudoers
fi fi
chmod 440 /etc/sudo.conf
chmod 440 /etc/sudoers
chmod 440 /etc/sudoers.d
printf "ACE: Setting up groups...\n" printf "ACE: Setting up groups...\n"
# If not existing, ensure we have a group for our user. # If not existing, ensure we have a group for our user.