From faf96544c836ec9d5beb7224a126df8458377cd7 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 28 Apr 2012 07:43:29 -0500 Subject: [PATCH 1/3] Fix typo in beadm.1 --- beadm.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beadm.1 b/beadm.1 index 938475f..d92ac2b 100644 --- a/beadm.1 +++ b/beadm.1 @@ -64,7 +64,7 @@ for the next boot. .Pp Creates a new boot environment named .Ar beName . -If the -e param is specified, the new environment will be clonsed from the given +If the -e param is specified, the new environment will be cloned from the given .Ar nonActiveBe | Ar beName@snapshot . .Pp .It Ic create From c1626f0e9d4289e261ed5a0032b2a4c48c457558 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 29 Apr 2012 10:54:43 -0500 Subject: [PATCH 2/3] Also consider /boot/loader.conf.local when updating vfs.root.mountfrom --- beadm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beadm b/beadm index 278fabf..baf9321 100755 --- a/beadm +++ b/beadm @@ -152,7 +152,9 @@ case ${1} in } zfs set mountpoint=${MNT} ${POOL}/ROOT/${2} cp /boot/zfs/zpool.cache ${MNT}/boot/zfs/zpool.cache - sed -i '' -E s/"^vfs.root.mountfrom=.*$"/"vfs.root.mountfrom=\"zfs:${POOL}\/ROOT\/${2##*/}\""/g ${MNT}/boot/loader.conf + LOADER_CONFIGS=${MNT}/boot/loader.conf + [ -f ${MNT}/boot/loader.conf.local ] && LOADER_CONFIGS="${LOADER_CONFIGS} ${MNT}/boot/loader.conf.local" + sed -i '' -E s/"^vfs.root.mountfrom=.*$"/"vfs.root.mountfrom=\"zfs:${POOL}\/ROOT\/${2##*/}\""/g ${LOADER_CONFIGS} zfs set mountpoint=legacy ${POOL}/ROOT/${2} } zpool set bootfs=${POOL}/ROOT/${2} ${POOL} && { From aa795ab4bcbe9c046c17652708522be0aa972531 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 29 Apr 2012 10:56:44 -0500 Subject: [PATCH 3/3] Promote all filesystems under the new BE, not just the root --- beadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beadm b/beadm index 278fabf..8837bb2 100755 --- a/beadm +++ b/beadm @@ -164,7 +164,7 @@ case ${1} in zfs list -H -o name -t filesystem -r ${POOL}/ROOT/${2} \ | while read I do - zfs promote ${POOL}/ROOT/${2} 2> /dev/null + zfs promote ${I} 2> /dev/null done echo "Activated successfully" ;;