diff --git a/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh b/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh index 4288628..13e6027 100755 --- a/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh +++ b/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh @@ -74,8 +74,7 @@ function configure_normal() # remove deb-files, that were left by dfsbuild test -d /opt/packages && rm -r /opt/packages - # set exitcode to zero - true + return 0 } @@ -87,14 +86,16 @@ function configure_secure() sed -i '/getty/d' /etc/inittab # remove unnecessary packages - dpkg --force-all -P $SECURITY_REMOVE_PACKAGES 2>&1 | grep -v "which isn't installed." + dpkg --force-all -P $SECURITY_REMOVE_PACKAGES 2>&1 | grep -v "which isn't installed." || true # remove the development features script - rm -f "$DEV_FEATURES_SCRIPT" + [ -e "$DEV_FEATURES_SCRIPT" ] && rm -f "$DEV_FEATURES_SCRIPT" # maybe an authorized_keys file was created - but it is not dangerous, # as the openssh package was removed anyway - rm -rf /root/.ssh + [ -d /root/.ssh ] && rm -rf /root/.ssh + + return 0 }