Commit 382cfcae authored by Leigh B. Stoller's avatar Leigh B. Stoller

Remove rsyncd startup script.

Add -b option (batchmode) to turn off y/n prompt.
parent 01ebcf97
...@@ -47,17 +47,21 @@ use Getopt::Std; ...@@ -47,17 +47,21 @@ use Getopt::Std;
# Handle command-line options # Handle command-line options
# #
sub usage { sub usage {
print "Usage: ops-install [-p packagedir]\n"; print "Usage: ops-install [-b] [-p packagedir]\n";
exit(1); exit(1);
} }
my $packagedir = ""; my $packagedir = "";
my $batchmode = 0;
my %opts; my %opts;
getopt("p:",%opts); getopt("p:b",%opts);
if ($opt{p}) { if ($opt{p}) {
$packagedir = $opt{p}; $packagedir = $opt{p};
} }
if ($opt{b}) {
$batchmode = 1;
}
if (@ARGV) { if (@ARGV) {
usage(); usage();
...@@ -141,10 +145,14 @@ my $OPS_PORT = "emulab-ops-1.4"; ...@@ -141,10 +145,14 @@ my $OPS_PORT = "emulab-ops-1.4";
# #
# Make sure they know what they're getting into... # Make sure they know what they're getting into...
# #
print STDERR "WARNING: This script is ONLY intended to be run on a machine\n"; if (! $batchmode) {
print STDERR "that is being set up as a dedicated ops node. Continue? [y/N] "; print STDERR
my $response = <>; "WARNING: This script is ONLY intended to be run on a machine\n";
die "Installation aborted!\n" unless ($response =~ /^y/i); print STDERR
"that is being set up as a dedicated ops node. Continue? [y/N] ";
my $response = <>;
die "Installation aborted!\n" unless ($response =~ /^y/i);
}
if ($UID != 0) { if ($UID != 0) {
die "This script must be run as root.\n"; die "This script must be run as root.\n";
...@@ -461,6 +469,12 @@ Phase "event", "Setting up event system", sub { ...@@ -461,6 +469,12 @@ Phase "event", "Setting up event system", sub {
}; };
Phase "rc.d", "Setting up rc.d scripts", sub { Phase "rc.d", "Setting up rc.d scripts", sub {
Phase "rsyncd", "Removing rsyncd startup script", sub {
DoneIfDoesntExist("$RCDIR/rsyncd.sh");
if (!unlink "$RCDIR/rsyncd.sh") {
PhaseFail("Unable to remove $RCDIR/rsyncd.sh: $!");
}
};
Phase "rc.testbed", "Installing testbed RC scripts", sub { Phase "rc.testbed", "Installing testbed RC scripts", sub {
Phase "elvind.sh", "Removing port version of elvind.sh", sub { Phase "elvind.sh", "Removing port version of elvind.sh", sub {
DoneIfDoesntExist("$RCDIR/elvind.sh"); DoneIfDoesntExist("$RCDIR/elvind.sh");
......
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