diff options
author | David Runge <dave@sleepmap.de> | 2016-01-14 09:39:40 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-01-14 09:39:40 +0100 |
commit | 8658c459be0edfa61798fb794bd843b30a3ee351 (patch) | |
tree | 74bb3c08661dc97697226c904c9c236dfbdf0466 /bin | |
parent | 41e7a667e984a9b1bdd2122650e00bfc3ce380c0 (diff) | |
parent | a264f66a81e6c7558fbee03b47665479692f7646 (diff) | |
download | dotfiles-8658c459be0edfa61798fb794bd843b30a3ee351.tar.gz dotfiles-8658c459be0edfa61798fb794bd843b30a3ee351.tar.bz2 dotfiles-8658c459be0edfa61798fb794bd843b30a3ee351.tar.xz dotfiles-8658c459be0edfa61798fb794bd843b30a3ee351.zip |
Merge branch 'master' of sleepmap.de:dotfiles
* 'master' of sleepmap.de:dotfiles:
bin/switch_wfs_os: Adding message about calling nodes where it belongs (only called once).
Diffstat (limited to 'bin')
-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 |