aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-01-12 11:31:01 +0100
committerDavid Runge <dave@sleepmap.de>2016-01-12 11:31:01 +0100
commita264f66a81e6c7558fbee03b47665479692f7646 (patch)
tree817865487265a3423608b45670359bd56732b741
parentd4c91e5cf6e1707fcffbad04a4c926e88cba2d04 (diff)
downloaddotfiles-a264f66a81e6c7558fbee03b47665479692f7646.tar.gz
dotfiles-a264f66a81e6c7558fbee03b47665479692f7646.tar.bz2
dotfiles-a264f66a81e6c7558fbee03b47665479692f7646.tar.xz
dotfiles-a264f66a81e6c7558fbee03b47665479692f7646.zip
bin/switch_wfs_os: Adding message about calling nodes where it belongs (only called once).
-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