diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-11-10 10:20:49 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-11-10 10:20:49 +0000 |
commit | 48a10cc1cdd33cd4165b3c3766bb5edc8a6481cd (patch) | |
tree | ea72458f93e3643b066ff33267c8847699201122 /usr.sbin/syspatch/syspatch.sh | |
parent | 267cbed31db6503f486d7e04429971f05102fd9c (diff) |
Create the bsd rollback kernel in create_rollback() (it is contained in
the rollback tarball anyway but that's impractical if the new bsd does
not boot ;-)).
While here, make sure /bsd actually exists before saving it.
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 049aab2a7af..17d4e66bf9d 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.42 2016/11/08 16:39:57 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.43 2016/11/10 10:20:48 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -100,6 +100,10 @@ create_rollback() for _file in ${_files}; do [[ -f /${_file} ]] || continue + # only save the original release kernel once + if [[ ${_file} == bsd && -f /bsd && ! -f /bsd.rollback${_RELINT} ]]; then + install -FSp /bsd /bsd.rollback${_RELINT} + fi _rbfiles="${_rbfiles} ${_file}" done @@ -150,10 +154,6 @@ install_kernel() local _bsd=/bsd _kern=$1 [[ -n ${_kern} ]] - # only save the original release kernel once - [[ -f /bsd.rollback${_RELINT} ]] || - install -FSp /bsd /bsd.rollback${_RELINT} - if ${_BSDMP}; then [[ ${_kern##*/} == bsd ]] && _bsd=/bsd.sp fi |