From a264f66a81e6c7558fbee03b47665479692f7646 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 12 Jan 2016 11:31:01 +0100 Subject: bin/switch_wfs_os: Adding message about calling nodes where it belongs (only called once). --- bin/switch_wfs_os | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/switch_wfs_os b/bin/switch_wfs_os index 7f2255d..c243826 100755 --- a/bin/switch_wfs_os +++ b/bin/switch_wfs_os @@ -50,8 +50,8 @@ if [ "$os_set" == "${os_new}" ] && [ "$os_current" == "${os_new}" ]; then if [[ " ${hostnames_arch[@]} " =~ " $host " ]]; then echo "Switching to: $os_old" sed -i 's/^DEFAULT .*/DEFAULT '${os_old}'/' $syslinux_location - echo "Calling script on nodes:" if [[ "${hostnames_arch[0]}" == "$host" ]]; then + echo "Calling script on nodes:" set +e ssh wfs@${hostnames_arch[1]} "/usr/bin/sudo bin/$(basename $0)" ssh wfs@${hostnames_arch[2]} "/usr/bin/sudo bin/$(basename $0)" @@ -67,8 +67,8 @@ elif [ "$os_set" == "${os_old}" ] && [ "$os_current" == "${os_old}" ]; then if [[ " ${hostnames_ubuntu[@]} " =~ " $host " ]]; then echo "Switching to: $os_new" sed -i 's/^DEFAULT .*/DEFAULT '${os_new}'/' $syslinux_location - echo "Calling script on nodes:" if [[ "${hostnames_ubuntu[0]}" == "$host" ]]; then + echo "Calling script on nodes:" ssh wfs@${hostnames_ubuntu[1]} "/usr/bin/sudo bin/$(basename $0)" ssh wfs@${hostnames_ubuntu[2]} "/usr/bin/sudo bin/$(basename $0)" fi -- cgit v1.2.3-70-g09d2