vendor/sunnyvalley: rework this a tiny bit

This commit is contained in:
Franco Fichtner 2019-09-18 07:24:26 +02:00
parent 6940d0c894
commit 1305bca891
4 changed files with 13 additions and 18 deletions

View File

@ -1,3 +1,3 @@
REPO_FILE=/usr/local/etc/pkg/repos/SunnyValley.conf
rm -f /usr/local/etc/pkg/repos/SunnyValley.conf
rm -f "${REPO_FILE}"

View File

@ -1,16 +1,12 @@
OPNSENSE_FLAVOR=$(/usr/local/sbin/opnsense-version -f)
REPO_FILE=/usr/local/etc/pkg/repos/SunnyValley.conf
if [ "${OPNSENSE_FLAVOR}" == "OpenSSL" ]; then
echo "Configuring repository for OpenSSL flavor"
elif [ "${OPNSENSE_FLAVOR}" == "LibreSSL" ]; then
echo "Configuring repository for LibreSSL flavor"
else
echo "Unsupported OPNsense flavor, aborting"
exit 1
fi
cat /usr/local/etc/pkg/repos/SunnyValley.conf.shadow.in | sed "s/%%FLAVOR%%/${OPNSENSE_FLAVOR}/g" > /usr/local/etc/pkg/repos/SunnyValley.conf
case "${OPNSENSE_FLAVOR}" in
OpenSSL|LibreSSL)
echo "Configuring repository for ${OPNSENSE_FLAVOR} flavor"
sed "s/%%FLAVOR%%/${OPNSENSE_FLAVOR}/g" "${REPO_FILE}".template > "${REPO_FILE}"
;;
*)
echo "Unsupported OPNsense flavor (${OPNSENSE_FLAVOR}), aborting"
;;
esac

View File

@ -1,6 +1,5 @@
PLUGIN_NAME= sunnyvalley
PLUGIN_VERSION= 1.0
PLUGIN_REVISION= 1
PLUGIN_VERSION= 1.1
PLUGIN_COMMENT= Sunny Valley Networks Vendor Repository
PLUGIN_MAINTAINER= opensource@sunnyvalley.io