ACC SHELL
#!/bin/sh
#================
# FILE : YaST2.ssh
#----------------
# PROJECT : YaST (Yet another Setup Tool v2)
# COPYRIGHT : (c) 2004 SUSE Linux AG, Germany. All rights reserved
# :
# AUTHORS : Steffen Winterfeldt <snwint@suse.de>
# . Arvin Schnell <arvin@suse.de>
# : Marcus Schaefer <ms@suse.de>
# :
# BELONGS TO : System installation and Administration
# :
# DESCRIPTION : This is the main script to restart the YaST2 installer
# : if we are within a ssh installation environment
# : This script is called manually
# :
# STATUS : $Id: YaST2.ssh 60499 2010-01-22 14:57:59Z aschnell $
#----------------
#========================================
# boot into system
#----------------------------------------
function continue_after_second_stage () {
cat <<-EOF
Continue with booting ...
You can login with the (new) root password or the
newly created user account in a few seconds ...
EOF
}
function reboot_during_second_stage () {
cat <<-EOF
Your system has been updated and needs to reboot ...
Reconnect to the system after it reboots and call
/usr/lib/YaST2/startup/YaST2.ssh again to continue
the installation ...
EOF
}
function not_running_yast () {
cat <<-EOF
File /var/lib/YaST2/runme_at_boot does not exist ...
Not running YaST ...
EOF
}
#========================================
# call YaST2 if flag file exists
#----------------------------------------
if [ -f /var/lib/YaST2/runme_at_boot ];then
# running the second stage installation
/usr/lib/YaST2/startup/YaST2.call installation continue
if [ -f /etc/install.inf ] ; then
SecondStageRequired=$(awk ' /^SecondStageRequired:/ { print $2 }' < /etc/install.inf)
fi
if [ -n "$SecondStageRequired" -a "$SecondStageRequired" = "1" ] ; then
# second stage installation needs to reboot
reboot_during_second_stage
else
# second stage has just finished
continue_after_second_stage
fi
else
not_running_yast
exit 1
fi
ACC SHELL 2018