Ensure /etc/gettytab is of a sane size and restore from backup + log if it is not

This commit is contained in:
Scott Ullrich 2010-09-19 16:31:27 -04:00
parent effd2ecda6
commit 64183253fa

7
etc/rc
View File

@ -328,6 +328,13 @@ fi
echo "done."
# Ensure gettytab is of a sane size
if [ `/bin/ls -la /etc/gettytab | /usr/bin/awk '{ print $5'}` -lt 512 ]; then
echo ">>> Restoring /etc/gettytab due to unusal size"
echo ">>> Restoring /etc/gettytab due to unusal size" | /usr/bin/logger
cp /etc/gettytab.bak /etc/gettytab
fi
# Recreate capabilities DB
cap_mkdb /etc/login.conf