diff options
Diffstat (limited to 'bin/switch_wfs_os')
-rwxr-xr-x | bin/switch_wfs_os | 4 |
1 files 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 |