I made a script to configure the server through the PXE.
When boot via pxe, The shell.sh appears on the server.
But if an incorrect value is entered in the script input paragraph(read), the power is turned off immediately.
Is there a way to return it to the input paragraph?
Added the script below:
#!/bin/bash
(omit)
echo "*************************"
echo "Select script"
echo " 1) firmware"
echo " 2) capture"
echo " 3) get"
echo ""
echo " 4) SMBSET_FW+BIOSSET"
echo ""
echo " b) bash shell"
echo " n) systeminfo"
echo " e) poweroff"
echo " r) reboot"
echo "*************************${normal}"
read num
case $num in
1) bash ./firmware.sh;;
2) bash ./capture.sh;;
3) bash ./get.sh;;
4) bash ./smb.sh;;
b) bash ./bash.sh;;
n) bash ./systeminfo.sh;;
e) poweroff -f;;
r) reboot -f;;
esac
qit will simply not execute any of the commands in thecasestatement. Voting to close as unreproducible.choice?