summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-09 19:55:23 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-09 19:55:54 -0400
commite4225b6fcb7f4d0661f24439b99ee9fb06777dd4 (patch)
tree13dac69e24906e15ebea650e0e9f058c9aaf4dc8 /tmp
parent8a14ed49c32e98d3ddd06350a1d930183be7fb57 (diff)
downloadpfsense-e4225b6fcb7f4d0661f24439b99ee9fb06777dd4.zip
pfsense-e4225b6fcb7f4d0661f24439b99ee9fb06777dd4.tar.gz
Handle console too for noninteractive
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..f14b270 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 ] || [ `env | grep cons25 | 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 ] || [ `env | grep cons25 | 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