From 3842ee836c7c6771bbf5c41750d758c844c3fd82 Mon Sep 17 00:00:00 2001 From: James Swineson Date: Tue, 9 Apr 2019 15:55:48 +0800 Subject: [PATCH] correctly set -x --- menhera.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/menhera.sh b/menhera.sh index 82f71b2..e9b84e6 100755 --- a/menhera.sh +++ b/menhera.sh @@ -117,7 +117,7 @@ unmount_old_rootfs() { } # main procedure -set -x +set +x if [[ $EUID -ne 0 ]]; then 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" confirm || exit -1 -set +x +set -x sync_filesystem @@ -141,13 +141,15 @@ install_software copy_config 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 "After your confirmation, we are going to kill the old SSH server." confirm || exit -1 -set +x +set -x clear_processes -unmount_old_rootfs \ No newline at end of file +unmount_old_rootfs + +set +x \ No newline at end of file