Commit 29463d50 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Minor fix for installing tarballs; Use -C arg to tar instead.

parent e993a69b
...@@ -104,6 +104,7 @@ my $CDROMSTATUS_BADPRIVKEY = 103; ...@@ -104,6 +104,7 @@ my $CDROMSTATUS_BADPRIVKEY = 103;
my $CDROMSTATUS_BADIPADDR = 104; my $CDROMSTATUS_BADIPADDR = 104;
my $CDROMSTATUS_BADREMOTEIP = 105; my $CDROMSTATUS_BADREMOTEIP = 105;
my $CDROMSTATUS_IPADDRINUSE = 106; my $CDROMSTATUS_IPADDRINUSE = 106;
my $CDROMSTATUS_UPGRADEERROR = 107;
my $CDROMSTATUS_OTHER = 199; my $CDROMSTATUS_OTHER = 199;
my %weberrors = my %weberrors =
...@@ -114,6 +115,7 @@ my %weberrors = ...@@ -114,6 +115,7 @@ my %weberrors =
$CDROMSTATUS_BADIPADDR => "IP address does not match key", $CDROMSTATUS_BADIPADDR => "IP address does not match key",
$CDROMSTATUS_BADREMOTEIP => "IP address does not match remote IP", $CDROMSTATUS_BADREMOTEIP => "IP address does not match remote IP",
$CDROMSTATUS_IPADDRINUSE => "IP address already registered at Netbed", $CDROMSTATUS_IPADDRINUSE => "IP address already registered at Netbed",
$CDROMSTATUS_UPGRADEERROR => "Error getting upgrade instructions",
$CDROMSTATUS_OTHER => "Unknown Error", $CDROMSTATUS_OTHER => "Unknown Error",
); );
...@@ -768,9 +770,6 @@ sub MakeFS($$) ...@@ -768,9 +770,6 @@ sub MakeFS($$)
if ($?); if ($?);
$needumount = 1; $needumount = 1;
chdir("/mnt") or
fatal("Could not chdir to /mnt!");
# #
# If told to use a local image from the CDROM, its really easy! # If told to use a local image from the CDROM, its really easy!
# #
...@@ -785,7 +784,7 @@ sub MakeFS($$) ...@@ -785,7 +784,7 @@ sub MakeFS($$)
print "Unpacking $tarball to $mntpoint.\n"; print "Unpacking $tarball to $mntpoint.\n";
print $PATIENCEMSG; print $PATIENCEMSG;
mysystem("tar -zxf /$tarball"); mysystem("tar -zxf /$tarball -C /mnt");
fatal("Failed to untar /$tarball!") fatal("Failed to untar /$tarball!")
if ($?); if ($?);
} }
...@@ -814,14 +813,11 @@ sub MakeFS($$) ...@@ -814,14 +813,11 @@ sub MakeFS($$)
print "Unpacking tarball.\n"; print "Unpacking tarball.\n";
print $PATIENCEMSG; print $PATIENCEMSG;
mysystem("tar -zxf /mnt/slicex.tar.gz"); mysystem("tar -zxf /mnt/slicex.tar.gz -C /mnt");
fatal("Failed to untar /mnt/slicex.tar.gz!") fatal("Failed to untar /mnt/slicex.tar.gz!")
if ($?); if ($?);
} }
chdir("/") or
fatal("Could not chdir to /!");
mysystem("umount /mnt"); mysystem("umount /mnt");
fatal("Failed to unmount /mnt!") fatal("Failed to unmount /mnt!")
if ($?); if ($?);
......
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