I see sudo reboot
in the middle of a script - meaning there are more commands after it. Is there any situation when the commands after reboot
can be executed, assuming that reboot
is not within an if
block?
Following is the portion of the script with reboot
in it. Note that there is no if
block involved.
sudo sysctl -p # applies sysctl.conf changes
sudo sed -i "s/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/" /etc/ssh/sshd_config
sudo service ssh restart
sudo reboot
echo "postfix postfix/main_mailer_type select No configuration" | sudo debconf-set-selections
echo "gridengine-master shared/gridenginemaster string hpc-master" | sudo debconf-set-selections
echo "gridengine-master shared/gridenginecell string default" | sudo debconf-set-selections
echo "gridengine-master shared/gridengineconfig boolean false" | sudo debconf-set-selections
echo "gridengine-common shared/gridenginemaster string hpc-master" | sudo debconf-set-selections
echo "gridengine-common shared/gridenginecell string default" | sudo debconf-set-selections
echo "gridengine-common shared/gridengineconfig boolean false" | sudo debconf-set-selections
echo "gridengine-client shared/gridenginemaster string hpc-master" | sudo debconf-set-selections
echo "gridengine-client shared/gridenginecell string default" | sudo debconf-set-selections
echo "gridengine-client shared/gridengineconfig boolean false" | sudo debconf-set-selections
sudo DEBIAN_FRONTEND=noninteractive apt-get install gridengine-common gridengine-client gridengine-master -y
sudo -u sgeadmin /usr/share/gridengine/scripts/init_cluster /var/lib/gridengine default /var/spool/gridengine/spooldb sgeadmin
sudo service gridengine-master restart
sudo service postfix stop
sudo update-rc.d postfix disable
reboot
command. – emory Oct 21 '14 at 19:18reboot
executable. It is an odd way of organizing scripts, though. – zhouji Oct 22 '14 at 15:17