Revision f63eed35

b/devel/upload.in
26 26
# $prefix/sbin. It needs passwordless root login to the nodes.
27 27

  
28 28
set -e
29

  
30
NO_RESTART=
31
hosts=
32
while [ "$#" -gt 0 ]; do
33
  opt="$1"
34
  case "$opt" in
35
    --no-restart)
36
      NO_RESTART=1
37
    ;;
38
    -*)
39
      echo "Unknown option: $opt" >&2
40
      exit 1
41
    ;;
42
    *)
43
      hosts="$hosts $opt"
44
    ;;
45
  esac
46
  shift
47
done
48

  
49
set ${hosts}
50

  
29 51
TXD=`mktemp -d`
30 52
trap 'rm -rf $TXD' EXIT
31 53

  
......
63 85
fi
64 86
wait
65 87

  
66
for host; do
67
  echo Restarting ganeti-noded on ${host}...
68
  ssh root@${host} /etc/init.d/ganeti restart &
69
done
70
wait
88
if test -z "${NO_RESTART}"; then
89
  for host; do
90
    echo Restarting ganeti-noded on ${host}...
91
    ssh root@${host} /etc/init.d/ganeti restart &
92
  done
93
  wait
94
fi

Also available in: Unified diff