diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2025-12-13 22:46:25 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-02-05 15:01:12 +0000 |
| commit | b3f23ae1e22bf88de5ec09c524e7e0beb16b5c76 (patch) | |
| tree | 04cb4673ab5a0ddcf4e8fd51d86ba0d6b5085508 | |
| parent | 93fbf353b62c02cebd42e08e1ed97225fe526447 (diff) | |
nextboot: Reimplement missing -a option
PR: 260520
MFC after: 3 days
Fixes: e307eb94ae52 ("loader: zfs should support bootonce an nextboot")
(cherry picked from commit 33510b16e663bde5be5e4a56ccb17f848c41ef4e)
| -rw-r--r-- | sbin/reboot/nextboot.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/reboot/nextboot.sh b/sbin/reboot/nextboot.sh index 4b34001677ff..d68c865da4e5 100644 --- a/sbin/reboot/nextboot.sh +++ b/sbin/reboot/nextboot.sh @@ -115,6 +115,10 @@ set -e nextboot_tmp=$(mktemp $(dirname ${nextboot_file})/nextboot.XXXXXX) +if [ ${append} = "YES" -a -f ${nextboot_file} ]; then + cp -f ${nextboot_file} ${nextboot_tmp} +fi + if [ -n "${zfs}" ]; then zfsbootcfg -z ${zfs} -n freebsd:nvstore -k nextboot_enable -v YES cat >> ${nextboot_tmp} << EOF |
