From cb6f138a3fe6a338c3ad14c5ea5bbe51f05f22a8 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Wed, 25 Sep 2013 11:19:10 +0200 Subject: [PATCH] Make it possible to override openup values using /etc/openup.conf instead of editing the script directly -- since the script will need to be overwritten on update. --- openup | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/openup b/openup index 07b3e0b..25b15a7 100755 --- a/openup +++ b/openup @@ -16,18 +16,22 @@ # # Author: Antoine Jacoutot -### user defined variables -OPENUP_URL="https://stable.mtier.org/openup" -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" -PKG_PATH_MAIN="http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)" -PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)" -VUXML_URL="https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml" -### end of user defined variables +[ -f /etc/openup.conf ] && . /etc/openup.conf -######################################################################## -### DO NOT MODIFY ANYTHING BELOW THIS LINE!!! ### -######################################################################## +##### user defined variables -- overrides are read from /etc/openup.conf +# URL to the latest openup version +OPENUP_URL="${OPENUP_URL:=https://stable.mtier.org/openup}" +# URL to the certificate that was used to sign the packages +PKG_CERT_URL="${PKG_CERT_URL:=https://stable.mtier.org/mtier.cert}" +# fingerprint of the certificate that was used to sign the packages +PKG_CERT_FPRINT="${PKG_CERT_FPRINT:=DE:29:0F:7F:B8:0E:36:5A:AF:A9:BF:E0:4E:08:C2:0F:2D:50:16:97}" +# PKG_PATH for currently running OpenBSD release +PKG_PATH_MAIN="${PKG_PATH_MAIN:=http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)}" +# PKG_PATH for the corresponding release stable packages service +PKG_PATH_UPDATE="${PKG_PATH_UPDATE:=https://stable.mtier.org/updates/$(uname -r)/$(arch -s)}" +# URL to the latest vuxml (vulnerabilities database) +VUXML_URL="${VUXML_URL:=https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml}" +##### end of user defined variables _OPENUP_VERSION=10 _OPENUP_MINREL=53