silent error in "harden" action fixed

This commit is contained in:
lars 2005-10-04 11:27:24 +00:00
parent b6ef226aeb
commit f9007fb3ca
1 changed files with 6 additions and 5 deletions

View File

@ -74,8 +74,7 @@ function configure_normal()
# remove deb-files, that were left by dfsbuild # remove deb-files, that were left by dfsbuild
test -d /opt/packages && rm -r /opt/packages test -d /opt/packages && rm -r /opt/packages
# set exitcode to zero return 0
true
} }
@ -87,14 +86,16 @@ function configure_secure()
sed -i '/getty/d' /etc/inittab sed -i '/getty/d' /etc/inittab
# remove unnecessary packages # 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 # 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, # maybe an authorized_keys file was created - but it is not dangerous,
# as the openssh package was removed anyway # as the openssh package was removed anyway
rm -rf /root/.ssh [ -d /root/.ssh ] && rm -rf /root/.ssh
return 0
} }