diff options
author | Gangadhar Mylapuram <Gangadhar.M@Sun.COM> | 2009-10-05 00:02:26 -0700 |
---|---|---|
committer | Gangadhar Mylapuram <Gangadhar.M@Sun.COM> | 2009-10-05 00:02:26 -0700 |
commit | 4e483a70ad68180118b7849b76ccb46451faa784 (patch) | |
tree | 4561f1655d6ecbdd63cd942e9af3101a8f850b14 /usr/src/cmd/boot | |
parent | d5d7cf4e084ada61ab475b433429da88487a6725 (diff) | |
download | illumos-gate-4e483a70ad68180118b7849b76ccb46451faa784.tar.gz |
6878665 bootenv rc entry in menu.lst is not aware of ZFS root
Diffstat (limited to 'usr/src/cmd/boot')
-rw-r--r-- | usr/src/cmd/boot/bootadm/bootadm.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/usr/src/cmd/boot/bootadm/bootadm.c b/usr/src/cmd/boot/bootadm/bootadm.c index 9b9a5d8dd6..2cad4ac2f5 100644 --- a/usr/src/cmd/boot/bootadm/bootadm.c +++ b/usr/src/cmd/boot/bootadm/bootadm.c @@ -8967,9 +8967,23 @@ get_set_kernel( strchr(signbuf, ')') == NULL); if (optnum == KERNEL_CMD) { - BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, new_path)); - entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, - signbuf, new_path, NULL, NULL, NULL); + if (strcmp(fstype, "zfs") == 0) { + new_str_len = strlen(new_path) + + strlen(ZFS_BOOT) + 8; + new_arg = s_calloc(1, new_str_len); + (void) snprintf(new_arg, new_str_len, "%s %s", + new_path, ZFS_BOOT); + BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, + new_arg)); + entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, + signbuf, new_arg, NULL, NULL, NULL); + free(new_arg); + } else { + BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, + new_path)); + entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, + signbuf, new_path, NULL, NULL, NULL); + } } else { new_str_len = strlen(path) + 8; if (strcmp(fstype, "zfs") == 0) { |