Commit 4261994a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Unify on the more modern "ron" version which does locking and logging.

parent c2ff0bfa
......@@ -4,7 +4,6 @@
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use Getopt::Std;
use English;
use Fcntl ':flock';
......@@ -23,17 +22,13 @@ my $optlist = "i";
my $batchmode = 1;
my $immediate = 0;
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/etc/emulab';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/usr/local/etc/emulab";
use libsetup;
#
......@@ -87,12 +82,12 @@ if ($UID) {
#
# Local config.
#
my $lockfile = "/var/tmp/node_update_lockfile";
my $lockfile = "$LOCKDIR/node_update_lockfile";
#
# Reuse the same log file so we can track errors.
#
my $logname = "/tmp/account_update.debug";
my $logname = "$LOGDIR/account_update.debug";
#
# Put this into the background so that the ssh can return immediately.
......@@ -134,7 +129,7 @@ while (flock(LOCK, LOCK_EX|LOCK_NB) == 0) {
sleep(5);
}
my $failed = remotenodeupdate();
my $failed = nodeupdate();
close(LOCK);
exit($failed);
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/etc/testbed';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/etc/testbed";
use libsetup;
#
# Update the system with new accounts/mounts/etc.
#
nodeupdate();
exit 0;
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/etc/rc.d/testbed';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/etc/rc.d/testbed";
use libsetup;
#
# Update the system with new accounts/mounts/etc.
#
nodeupdate();
exit 0;
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