diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-04-23 16:40:04 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-04-23 16:44:18 +0000 |
commit | b0df36580d5b0df67a0f58ded8f6356b268f7f71 (patch) | |
tree | 4029a470cb7a814be39d80455650f6f7752ca750 | |
parent | d500a85e640d1cd270747c12e17c511b53864436 (diff) | |
download | src-b0df36580d5b0df67a0f58ded8f6356b268f7f71.tar.gz src-b0df36580d5b0df67a0f58ded8f6356b268f7f71.zip |
etcupdate: Remove the old pre-world tree when rotating for -p.
This fixes a bug in an earlier change to move tree rotation to
the end of the update where the step to make room for the new
preworld tree was deleting the old "current" tree instead of
the old "preworld" tree.
Reported by: olivier, dhw
Fixes: 0611aec3cf3a373e6a06f103699dbc91c3d6d472
MFC after: 2 weeks
-rwxr-xr-x | usr.sbin/etcupdate/etcupdate.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index bb9eb00bc646..254a72abae08 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1644,7 +1644,7 @@ EOF if [ -z "$preworld" ]; then panic "New tree should be rotated to old" fi - if ! remove_tree $old; then + if ! remove_tree $new; then echo "Unable to remove previous pre-world tree." exit 1 fi |