summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-09 17:26:49 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-09 17:26:49 -0400
commite512c0a028da01b0316f6b1b1c387305d2b94d6e (patch)
tree7c9e5ef020696f37af3fc762b305201884c61691 /tmp
parentace6d864a3ff47fa4e29394d8cb6c714dde594cb (diff)
downloadpfsense-e512c0a028da01b0316f6b1b1c387305d2b94d6e.zip
pfsense-e512c0a028da01b0316f6b1b1c387305d2b94d6e.tar.gz
Fix non-interactive script bug on upgrade.
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/post_upgrade_command9
1 files changed, 9 insertions, 0 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index e1c66b8..08c6ac6 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -27,6 +27,15 @@ if [ $KERNELTYPE = "UP" ]; then
fi
fi
+# Detect interactive logins and display the shell
+echo "if [ `env | grep SSH_TTY | wc -l` -gt 0 ]; then" >> $CVS_CO_DIR/root/.shrc
+echo " /etc/rc.initial" >> $CVS_CO_DIR/root/.shrc
+echo " exit" >> $CVS_CO_DIR/root/.shrc
+echo "fi" >> $CVS_CO_DIR/root/.shrc
+echo "if [ `env | grep SSH_TTY | wc -l` -gt 0 ]; then" >> $CVS_CO_DIR/root/.profile
+echo " /etc/rc.initial" >> $CVS_CO_DIR/root/.profile
+echo " exit" >> $CVS_CO_DIR/root/.profile
+echo "fi" >> $CVS_CO_DIR/root/.profile
# Now turn on or off serial console as needed
php -f /tmp/post_upgrade_command.php
OpenPOWER on IntegriCloud