From af635540ad95b9f462bff0b573d071d042de6481 Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Tue, 9 Aug 2011 10:43:10 -0600 Subject: [PATCH] Minor fix; fdisk no longer accepts "da0" shorthand, it requires "/dev/da0" notation. --- clientside/tmcc/freebsd/mkextrafs.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clientside/tmcc/freebsd/mkextrafs.pl b/clientside/tmcc/freebsd/mkextrafs.pl index 50e297003..917b30f69 100755 --- a/clientside/tmcc/freebsd/mkextrafs.pl +++ b/clientside/tmcc/freebsd/mkextrafs.pl @@ -173,7 +173,7 @@ if ($mounted =~ /^${fsdevice} on (\S*)/) { # See what the current type is for the partition # my $stype = -1; -if (!open(FD, "fdisk -s $disk 2>&1|")) { +if (!open(FD, "fdisk -s /dev/$disk 2>&1|")) { die("*** $0:\n". " $disk: could not get partition info\n"); } @@ -199,6 +199,7 @@ while () { if (/^\s*([1-4]):\s+\d+\s+\d+\s+(0x\S\S)\s+/) { my $part = $1; my $type = hex($2); + # # If there is a valid partition on the disk and they are # using the entire disk without forcing, stop them! @@ -253,7 +254,7 @@ if ($usegeom && $slice != 0) { # partition 1 of the disk. # if ($slice == 0 && !$noinit) { - mysystem("fdisk -I $disk"); + mysystem("fdisk -I /dev/$disk"); } # # Otherwise set the partition type to BSD if not already set. -- GitLab