From 08fe13026c91e0189228bea82365255073bdec9e Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 9 Aug 2009 17:26:11 -0400 Subject: Fix non-interactive script bug on upgrade. --- tmp/post_upgrade_command | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tmp/post_upgrade_command') 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 -- cgit v1.1