diff --git a/install b/install index e5d7438..11c3f9d 100755 --- a/install +++ b/install @@ -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.1.1 +# version: 1.1.2 # if [[ $(id -u) -ne 0 ]]; then @@ -408,6 +408,13 @@ if [ ${version} -gt 4 ]; then ${rfkill} unblock all fi + # temporary change to support OMV 5.5.0 + if grep -q 'vlan|wireless' ${OMV_CONFIG_FILE}; then + wifi="wireless" + else + wifi="wifi" + fi + for nic in $(ls /sys/class/net | grep -v lo); do if grep -q "${nic}" ${OMV_CONFIG_FILE}; then echo "${nic} already found in database. Skipping..." @@ -426,7 +433,7 @@ if [ ${version} -gt 4 ]; then fi echo "Adding ${nic} to openmedivault database ..." jq --null-input --compact-output \ - "{uuid: \"${OMV_CONFIGOBJECT_NEW_UUID}\", devicename: \"${nic}\", type: \"wireless\", method: \"dhcp\", method6: \"dhcp\", wpassid: \"${wifiName}\", wpapsk: \"${wifiPass}\"}" | \ + "{uuid: \"${OMV_CONFIGOBJECT_NEW_UUID}\", devicename: \"${nic}\", type: \"${wifi}\", method: \"dhcp\", method6: \"dhcp\", wpassid: \"${wifiName}\", wpapsk: \"${wifiPass}\"}" | \ omv-confdbadm update "conf.system.network.interface" - cfg=1 fi