summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-09 17:26:11 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-09 17:26:11 -0400
commit08fe13026c91e0189228bea82365255073bdec9e (patch)
tree7eb986b6a5d83e51dc8d192cd295706fcd85535e /tmp
parent08c7e2e32cb0e25a0ab359160c3916cbc44133b2 (diff)
downloadpfsense-08fe13026c91e0189228bea82365255073bdec9e.zip
pfsense-08fe13026c91e0189228bea82365255073bdec9e.tar.gz
Fix non-interactive script bug on upgrade.
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/post_upgrade_command10
1 files changed, 10 insertions, 0 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index 48b3f59..08c6ac6 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -27,6 +27,16 @@ 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