aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-01-14 09:39:40 +0100
committerDavid Runge <dave@sleepmap.de>2016-01-14 09:39:40 +0100
commit8658c459be0edfa61798fb794bd843b30a3ee351 (patch)
tree74bb3c08661dc97697226c904c9c236dfbdf0466 /bin
parent41e7a667e984a9b1bdd2122650e00bfc3ce380c0 (diff)
parenta264f66a81e6c7558fbee03b47665479692f7646 (diff)
downloaddotfiles-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-xbin/switch_wfs_os4
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