Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
7ac28c17
Commit
7ac28c17
authored
Jun 25, 2013
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add update section, to make it easy to update entire MFS bundle from
the Utah downloads directory.
parent
714c9837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
+29
-9
install/phases/boss/mfs
install/phases/boss/mfs
+29
-9
No files found.
install/phases/boss/mfs
View file @
7ac28c17
...
...
@@ -19,10 +19,6 @@ sub Install($$$)
{
my ($server, $isupdate, $impotent) = @_;
# Replace if this script does an update for ip/domain.
return 0
if ($isupdate);
# Configure can override setting it here.
if ($MFSVERSION eq "") {
if ($FBSD_MAJOR > 8 || ($FBSD_MAJOR == 8 && $FBSD_MINOR >= 2)) {
...
...
@@ -40,6 +36,24 @@ sub Install($$$)
$MFSURL = "http://www.emulab.net/downloads/$MFSTARBALL";
}
#
# Want to recreate the directory and start over.
#
if ($isupdate) {
Phase "tftpboot_rename", "Backing up $TFTP_DIR", sub {
DoneIfDoesntExist($TFTP_DIR);
BackupDirectoryFatal($TFTP_DIR);
ExecQuietFatal("/bin/rm -rf $TFTP_DIR")
if (!$impotent);
};
Phase "tftpboot_recreate", "Recreating $TFTP_DIR", sub {
DoneIfExists($TFTP_DIR);
mkdir $TFTP_DIR,0775 or
PhaseFail("Unable to create $TFTP_DIR : $!");
ExecQuietFatal("$CHGRP tbadmin $TFTP_DIR");
};
}
Phase "mfs", "Setting up MFSs", sub {
my $localfile = "$TFTP_DIR/tftpboot.tar.gz";
...
...
@@ -99,6 +113,10 @@ sub Install($$$)
#
Phase "password", "Setting up MFS password", sub {
my $passhash;
# Skip in update mode.
PhaseSkip("update mode")
if ($isupdate);
my ($status, @output) =
ExecQuiet("$PREFIX/sbin/setsitevar -c $IMAGEPASSWORDSITEVAR");
...
...
@@ -154,11 +172,13 @@ sub Install($$$)
# already loaded, but the script will just skip over them without
# raising an error.
#
Phase "descriptors", "Loading the Image and OS IDS", sub {
ExecQuietFatal("cd $TOP_OBJDIR/install; ".
" $SUDO -u $PROTOUSER $WAP ".
" perl load-descriptors $MFSDESCRIPTORS");
};
if (!$isupdate) {
Phase "descriptors", "Loading the Image and OS IDS", sub {
ExecQuietFatal("cd $TOP_OBJDIR/install; ".
" $SUDO -u $PROTOUSER $WAP ".
" perl load-descriptors $MFSDESCRIPTORS");
};
}
PhaseSucceed("done");
};
return 0;
...
...
Write
Preview
Markdown
is supported
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