update pillar defaults and install lsb_release if not found

This commit is contained in:
Aaron Murray 2019-10-15 21:00:13 -05:00
parent f781d51b09
commit b7983316a0
2 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# installScript
# install the script's prerequisites
apt-get install wget lsb-release sudo
apt-get install wget sudo
# download script and execute
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

10
install
View File

@ -37,6 +37,11 @@ if [ -f /etc/armbian-release ]; then
. /etc/armbian-release
fi
if [ ! -f "/usr/bin/lsb_release" ]; then
echo "Installing lsb_release..."
apt-get --yes --no-install-recommends install lsb-release
fi
codename="$(lsb_release --codename --short)"
distributor="$(lsb_release --id --short)"
@ -224,6 +229,11 @@ omv_set_default "OMV_CPUFREQUTILS_GOVERNOR" "${GOVERNOR}"
omv_set_default "OMV_CPUFREQUTILS_MINSPEED" "${MIN_SPEED}"
omv_set_default "OMV_CPUFREQUTILS_MAXSPEED" "${MAX_SPEED}"
if [ ${version} -gt 4 ]; then
# update pillar default list - /srv/pillar/omv/default.sls
omv-salt stage run prepare
fi
# update config files
for service in samba flashmemory ssh ${ntp} timezone monit rrdcached collectd cpufrequtils ; do
${confCmd} ${service}