startup/Second-Stage/S07-medium
#!/bin/sh
log "Starting S07-medium..."
log "======================"
#=============================================
# 11) check medium related install.inf vars
#---------------------------------------------
Y2_NETWORK_ACTIVE=0
Y2_SSH_ACTIVE=0
USE_SSH=0
VNC=0
log "\tChecking kernel commandline..."
#=============================================
# 11.1 start shell on second virtual console
#---------------------------------------------
if ! got_install_param '^NoShell:.*1' ; then
log "\tGot kernel parameter <NoShell> -> start shell on tty2"
SPID=`/usr/lib/YaST2/bin/startshell /dev/tty2`
fi
#=============================================
# 11.1) activate network if configuration found
#---------------------------------------------
if [ ! -z "$(ls /etc/sysconfig/network/ifcfg-* |grep -v 'ifcfg-lo')" ]; then
log "\tnetwork configuration found -> activate network"
/usr/bin/systemctl start network && Y2_NETWORK_ACTIVE=1
[ -f /var/lib/YaST2/network_install_rpcbind ] && /usr/bin/systemctl start rpcbind
fi
#=============================================
# 11.2) prepare for VNC installation
#---------------------------------------------
if got_install_param '^VNC:.*1' ; then
log "\tGot kernel parameter VNC -> export VNC variable"
export VNC=1
fi
if got_install_param '^UseSSH:.*1' ; then
log "\tGot kernel parameter UseSSH -> export UseSSH variable"
/usr/bin/systemctl start sshd && Y2_SSH_ACTIVE=1
export USE_SSH=1
fi
log "\tSummary for commandline checks:"
log "\tY2_NETWORK_ACTIVE = $Y2_NETWORK_ACTIVE"
log "\tY2_SSH_ACTIVE = $Y2_SSH_ACTIVE"
log "\tUSE_SSH = $USE_SSH"
log "\tVNC = $VNC"