Commit 1101021e authored by David Johnson's avatar David Johnson
Browse files

Allow tagged reload_daemons to be run as non root; also a temp fix.

Also temporarily invoke os_load for reload_daemon with -R to force
reconfig -- should only be used by switches right now, so safe to globally
enable.
parent ba5d8029
......@@ -9,16 +9,6 @@
use English;
use Getopt::Std;
#
# This should run as root to make sure that it has permission to reboot nodes
# (since only root is allowed to power cycle nodes at any time - it's time-
# limited for anyone else)
#
if ($UID != 0) {
die("*** $0:\n".
" Only root can run this script!\n");
}
#
# Look for nodes to reload.
#
......@@ -75,7 +65,7 @@ sub fatal($);
sub notify($);
sub freefromreloading($);
my $os_load = "$TB/bin/os_load -s";
my $os_load = "$TB/bin/os_load -s -R";
my $sched_reload= "$TB/sbin/sched_reload";
my $reboot = "$TB/bin/node_reboot";
my $tbrsync = "$TB/bin/tbrsync";
......@@ -126,6 +116,16 @@ if (defined($options{"t"})) {
$logfile = "$logfile-$tag";
}
#
# This should run as root to make sure that it has permission to reboot nodes
# (since only root is allowed to power cycle nodes at any time - it's time-
# limited for anyone else)
#
if ($UID != 0 && !defined($tag)) {
die("*** $0:\n".
" Only root can run this script!\n");
}
#
# Only one please (for the default reload_daemon). If you specified
# a tag, it's your problem.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment