Skip to content
GitLab
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
38a39130
Commit
38a39130
authored
Oct 05, 2004
by
Leigh B. Stoller
Browse files
Create /etc/hosts on ops and make sure that names resolve.
parent
690af4d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/ops-install.in
View file @
38a39130
...
...
@@ -26,13 +26,13 @@ my @MAILING_LISTS = ("@TBOPSEMAIL@","@TBLOGSEMAIL@","@TBWWWEMAIL@",
"
@TBTESTSUITEEMAIL
@
");
my
$OURDOMAIN
=
'
@OURDOMAIN@
';
my
$
USER
NODE
=
'
@USER
NODE@
';
my
$
F
SNODE
=
'
@F
SNODE@
';
my
$BOSSNODE
=
'
@BOSSNODE@
';
my
$LOGFACIL
=
'
@TBLOGFACIL@
';
my
$OURDOMAIN
=
'
@OURDOMAIN@
';
my
$USERNODE
=
'
@USERNODE@
';
my
$
FS
NODE
=
'
@FS
NODE@
';
my
$
BOS
SNODE
=
'
@BOS
SNODE@
';
my
$BOSSNODE
_IP
=
'
@BOSSNODE
_IP
@
';
my
$USERNODE_IP
=
'
@USERNODE_IP@
';
my
$LOGFACIL
=
'
@TBLOGFACIL@
';
#
# Allow this to work if the library is left in the source directory
...
...
@@ -96,6 +96,7 @@ my $ENV = "/usr/bin/env";
# Some files we edit/create
#
my
$RCCONF
=
"
/etc/rc.conf
";
my
$HOSTS
=
"
/etc/hosts
";
my
$RCLOCAL
=
"
/etc/rc.local
";
my
$RCCAPTURE
=
"
$PREFIX
/etc/rc.capture
";
my
$LOCAL_HOSTNAMES
=
"
/etc/mail/local-host-names
";
...
...
@@ -146,6 +147,13 @@ my $IDENTPUB = "$TOP_SRCDIR/install/identity.pub";
#
my
$OPS_PORT
=
"
emulab-ops-1.4
";
#
# List of names that goes into $HOSTS and which must resolve.
#
my
@OPS_NAMES
=
(
$USERNODE
,
"
users
",
"
ops
");
push
(
@OPS_NAMES
,
$FSNODE
)
if
(
$USERNODE
ne
$FSNODE
);
#
# Make sure they know what they're getting into...
#
...
...
@@ -250,6 +258,25 @@ Phase "rc.conf", "Adding testbed content to rc.conf", sub {
qq|syslogd_flags=""|
);
};
Phase
"
hosts
",
"
Adding boss/ops IP addresses to
$HOSTS
",
sub
{
DoneIfEdited
(
$HOSTS
);
AppendToFileFatal
(
$HOSTS
,
"
${BOSSNODE_IP}
\t
${BOSSNODE}
boss
",
"
${USERNODE_IP}
\t
@OPS_NAMES
");
};
Phase
"
resolve
",
"
Checking to make sure names for boss/ops resolve
",
sub
{
foreach
my
$name
(
@OPS_NAMES
,
$
{
BOSSNODE
},
"
boss
")
{
Phase
$name
,
$name
,
sub
{
if
(
gethostbyname
(
$name
))
{
PhaseSkip
("
$name
resolves
");
}
else
{
PhaseFail
("
$name
does not resolve
");
}
};
}
};
Phase
"
sendmail
","
Configuring sendmail
",
sub
{
Phase
"
localhosts
",
"
Setting up
$LOCAL_HOSTNAMES
",
sub
{
DoneIfExists
(
$LOCAL_HOSTNAMES
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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