Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
382cfcae
Commit
382cfcae
authored
Sep 24, 2004
by
Leigh B. Stoller
Browse files
Remove rsyncd startup script.
Add -b option (batchmode) to turn off y/n prompt.
parent
01ebcf97
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/ops-install.in
View file @
382cfcae
...
...
@@ -47,17 +47,21 @@ use Getopt::Std;
# Handle command-line options
#
sub
usage
{
print
"
Usage: ops-install [-p packagedir]
\n
";
print
"
Usage: ops-install
[-b]
[-p packagedir]
\n
";
exit
(
1
);
}
my
$packagedir
=
"";
my
$batchmode
=
0
;
my
%opts
;
getopt
("
p:
",
%opts
);
getopt
("
p:
b
",
%opts
);
if
(
$opt
{
p
})
{
$packagedir
=
$opt
{
p
};
}
if
(
$opt
{
b
})
{
$batchmode
=
1
;
}
if
(
@ARGV
)
{
usage
();
...
...
@@ -141,10 +145,14 @@ my $OPS_PORT = "emulab-ops-1.4";
#
# Make sure they know what they're getting into...
#
print
STDERR
"
WARNING: This script is ONLY intended to be run on a machine
\n
";
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
(
!
$batchmode
)
{
print
STDERR
"
WARNING: This script is ONLY intended to be run on a machine
\n
";
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
)
{
die
"
This script must be run as root.
\n
";
...
...
@@ -461,6 +469,12 @@ Phase "event", "Setting up event system", 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
"
elvind.sh
",
"
Removing port version of elvind.sh
",
sub
{
DoneIfDoesntExist
("
$RCDIR
/elvind.sh
");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment