forked from mirrors/openup
Abort immediately if binpatch from an older release is installed.
This commit is contained in:
parent
20d2d91f3a
commit
f1c7ac9576
1 changed files with 12 additions and 3 deletions
15
openup
15
openup
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
# TODO
|
||||
# https://stable.mtier.org/vuxml/53.xml
|
||||
# check for installed binpatches from a previous release
|
||||
# extend usage() with doc from web; complete openup doc in usage()
|
||||
|
||||
### user defined variables
|
||||
|
|
@ -27,8 +26,7 @@ PKG_CERT_URL='https://stable.mtier.org/mtier.cert'
|
|||
PKG_CERT_FPRINT='DE:29:0F:7F:B8:0E:36:5A:AF:A9:BF:E0:4E:08:C2:0F:2D:50:16:97'
|
||||
### end of user defined variables
|
||||
|
||||
|
||||
# DO NOT MODIFY ANYTHING BELOW THIS LINE!!!
|
||||
### DO NOT MODIFY ANYTHING BELOW THIS LINE!!!
|
||||
|
||||
usage() {
|
||||
echo "usage: ${0##*/} [-SUn]" >&2
|
||||
|
|
@ -59,6 +57,17 @@ if ! grep -q installpath /etc/pkg.conf 2>/dev/null; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# check that we have no installed binpatches from a previous release
|
||||
_BPLIST=$(pkg_info -q |grep binpatch)
|
||||
if [ -n "${_BPLIST}" ]; then
|
||||
_i=$(echo ${_BPLIST} | wc -w)
|
||||
_v=$(echo ${BPLIST} | grep binpatch${REL_INT} | wc -w)
|
||||
if [ "${_i}" -ne "${_v}" ]; then
|
||||
error "Binpatch(es) from a previous release installed"
|
||||
fi
|
||||
fi
|
||||
unset _BPLIST
|
||||
|
||||
OPENUP_VERSION=2
|
||||
OPENUP_MINREL=53
|
||||
MEESA=$(readlink -f $0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue