correctly set -x
This commit is contained in:
parent
df26b22510
commit
3842ee836c
1 changed files with 7 additions and 5 deletions
10
menhera.sh
10
menhera.sh
|
@ -117,7 +117,7 @@ unmount_old_rootfs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# main procedure
|
# main procedure
|
||||||
set -x
|
set +x
|
||||||
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
echo "This script must be run as root"
|
echo "This script must be run as root"
|
||||||
|
@ -131,7 +131,7 @@ echo -e "\tYou have closed all programs you can, and backed up all important dat
|
||||||
echo -e "\tYou can SSH into your system as root user"
|
echo -e "\tYou can SSH into your system as root user"
|
||||||
confirm || exit -1
|
confirm || exit -1
|
||||||
|
|
||||||
set +x
|
set -x
|
||||||
|
|
||||||
sync_filesystem
|
sync_filesystem
|
||||||
|
|
||||||
|
@ -141,13 +141,15 @@ install_software
|
||||||
copy_config
|
copy_config
|
||||||
swap_root
|
swap_root
|
||||||
|
|
||||||
set -x
|
set +x
|
||||||
|
|
||||||
echo -e "If you are connecting from SSH, please create a second session to this host and confirm you can get a shell."
|
echo -e "If you are connecting from SSH, please create a second session to this host and confirm you can get a shell."
|
||||||
echo -e "After your confirmation, we are going to kill the old SSH server."
|
echo -e "After your confirmation, we are going to kill the old SSH server."
|
||||||
confirm || exit -1
|
confirm || exit -1
|
||||||
|
|
||||||
set +x
|
set -x
|
||||||
|
|
||||||
clear_processes
|
clear_processes
|
||||||
unmount_old_rootfs
|
unmount_old_rootfs
|
||||||
|
|
||||||
|
set +x
|
Loading…
Reference in a new issue