optimize and remove omv4 code

This commit is contained in:
Aaron Murray 2021-04-19 17:32:25 -05:00
parent 435b69c1ba
commit 92134e598c

22
install
View File

@ -13,7 +13,7 @@
# https://github.com/armbian/config/blob/master/debian-software
# https://forum.openmediavault.org/index.php/Thread/25062-Install-OMV5-on-Debian-10-Buster/
#
# version: 1.3.8
# version: 1.4.0
#
if [[ $(id -u) -ne 0 ]]; then
@ -222,13 +222,7 @@ if [[ ! "${omvInstall}" == "ii" ]]; then
exit 2
fi
if [ ${version} -gt 4 ]; then
omv-confdbadm populate
else
omv-initsystem
omv-mkconf interfaces
omv-mkconf issue
fi
omv-confdbadm populate
fi
# check if openmediavault is install properly
@ -384,15 +378,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 pillar default list - /srv/pillar/omv/default.sls
omv-salt stage run prepare
# update config files
for service in nginx ${phpfpm} samba flashmemory ssh ${ntp} timezone monit rrdcached collectd cpufrequtils apt watchdog; do
${confCmd} ${service}
done
${confCmd} nginx ${phpfpm} samba flashmemory ssh ${ntp} timezone monit rrdcached collectd cpufrequtils apt watchdog
# create php directories if they don't exist
modDir="/var/lib/php/modules"
@ -472,7 +462,7 @@ if [ -n "${USER}" ] && [ ! "${USER}" = "root" ] && [ ! "${USER}" = "pi" ]; then
fi
# remove networkmanager and dhcpcd5 then configure networkd
if [ ${version} -gt 4 ] && [ ${skipNet} -ne 1 ]; then
if [ ${skipNet} -ne 1 ]; then
if [ "${BOARD}" = "helios64" ]; then
echo -e '#!/bin/sh\n/usr/sbin/ethtool --offload eth1 rx off tx off' > /usr/lib/networkd-dispatcher/routable.d/10-disable-offloading