summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-09-19 16:31:27 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-09-19 16:31:37 -0400
commit64183253fa677c8fd14cf63dfae55e1571a5876b (patch)
tree3fa82149a7e47717cc30c9a17c15c2ccc7467530 /etc/rc
parenteffd2ecda61c326e0e85182c89bc063074dc9b8f (diff)
downloadpfsense-64183253fa677c8fd14cf63dfae55e1571a5876b.zip
pfsense-64183253fa677c8fd14cf63dfae55e1571a5876b.tar.gz
Ensure /etc/gettytab is of a sane size and restore from backup + log if it is not
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index fe98154..9b0fdbc 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
OpenPOWER on IntegriCloud