summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Setje-Eilers <Jan.Setje-Eilers@Sun.COM>2010-02-12 23:31:55 -0800
committerJan Setje-Eilers <Jan.Setje-Eilers@Sun.COM>2010-02-12 23:31:55 -0800
commitd5cb36d3c7216aae8e4ce9e18de69236501cdec7 (patch)
treef9e7e7fb982bb93f62ceede86e918df5e9a73952
parent91e187871f25f5f4cebb89ca6783e31ac6e8a540 (diff)
downloadillumos-gate-d5cb36d3c7216aae8e4ce9e18de69236501cdec7.tar.gz
6913949 bootadm must avoid fragile fstyp implementations to survive install not clearing the disk
-rw-r--r--usr/src/cmd/boot/bootadm/bootadm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/cmd/boot/bootadm/bootadm.c b/usr/src/cmd/boot/bootadm/bootadm.c
index 748bc2b4fe..99cb553e63 100644
--- a/usr/src/cmd/boot/bootadm/bootadm.c
+++ b/usr/src/cmd/boot/bootadm/bootadm.c
@@ -5602,8 +5602,12 @@ get_pool(char *osdev)
return (NULL);
}
+ /*
+ * Call the zfs fstyp directly since this is a zpool. This avoids
+ * potential pcfs conflicts if the first block wasn't cleared.
+ */
(void) snprintf(cmd, sizeof (cmd),
- "/usr/sbin/fstyp -a %s 2>/dev/null | /bin/grep '^name:'",
+ "/usr/lib/fs/zfs/fstyp -a %s 2>/dev/null | /bin/grep '^name:'",
osdev);
ret = exec_cmd(cmd, &flist);
@@ -5922,9 +5926,9 @@ process_slice_common(char *slice, FILE *tfp, mhash_t *mhp, char *tmpmnt)
return (0);
}
- /* Check if ufs */
+ /* Check if ufs. Call ufs fstyp directly to avoid pcfs conflicts. */
(void) snprintf(cmd, sizeof (cmd),
- "/usr/sbin/fstyp /dev/rdsk/%s 2>/dev/null",
+ "/usr/lib/fs/ufs/fstyp /dev/rdsk/%s 2>/dev/null",
slice);
if (exec_cmd(cmd, &flist) != 0) {