Commit 7451dbfc authored by Mike Hibler's avatar Mike Hibler

Fix to handle disks other than "ad0"

parent 01568e68
......@@ -66,6 +66,14 @@ if (! -d $mountpoint) {
" $mountpoint does not exist!\n");
}
#
# XXX determine the disk based on the root fs
#
my $rootdev = `df | egrep '/\$'`;
if ($rootdev =~ /^\/dev\/([a-z]+\d+)s[1-4][a-h]/) {
$disk = $1;
}
my $slicedev = "${disk}s${slice}";
my $fsdevice = "/dev/${slicedev}${partition}";
......
......@@ -62,6 +62,14 @@ if (! -d $mountpoint) {
" $mountpoint does not exist!\n");
}
#
# XXX determine the disk based on the root fs
#
my $rootdev = `df | egrep '/\$'`;
if ($rootdev =~ /^\/dev\/([a-z]+)\d+\s+/) {
$disk = $1;
}
my $diskdev = "/dev/${disk}";
my $fsdevice = "${diskdev}${slice}";
......
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