From 64183253fa677c8fd14cf63dfae55e1571a5876b Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 19 Sep 2010 16:31:27 -0400 Subject: [PATCH] Ensure /etc/gettytab is of a sane size and restore from backup + log if it is not --- etc/rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/rc b/etc/rc index fe98154657..9b0fdbc08e 100755 --- a/etc/rc +++ b/etc/rc @@ -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