add beta flag with sandworm support
This commit is contained in:
parent
538f1cf8ea
commit
6a4b6130a4
31
install
31
install
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
logfile="omv_install.log"
|
logfile="omv_install.log"
|
||||||
version="2.0.1"
|
version="2.1.0"
|
||||||
|
|
||||||
|
|
||||||
_log()
|
_log()
|
||||||
@ -67,6 +67,7 @@ if grep -q 'machine-lxc' /proc/1/cgroup; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
declare -i armbian=0
|
declare -i armbian=0
|
||||||
|
declare -i beta=0
|
||||||
declare -i cfg=0
|
declare -i cfg=0
|
||||||
declare -i ipv6=0
|
declare -i ipv6=0
|
||||||
declare -i rpi=0
|
declare -i rpi=0
|
||||||
@ -96,6 +97,7 @@ keyserver="hkp://keyserver.ubuntu.com:80"
|
|||||||
omvKey="/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg"
|
omvKey="/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg"
|
||||||
omvRepo="http://packages.openmediavault.org/public"
|
omvRepo="http://packages.openmediavault.org/public"
|
||||||
omvSources="/etc/apt/sources.list.d/openmediavault.list"
|
omvSources="/etc/apt/sources.list.d/openmediavault.list"
|
||||||
|
resolvTmp="/root/resolv.conf"
|
||||||
rfkill="/usr/sbin/rfkill"
|
rfkill="/usr/sbin/rfkill"
|
||||||
smbOptions=""
|
smbOptions=""
|
||||||
url="https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master"
|
url="https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master"
|
||||||
@ -114,9 +116,12 @@ if [ -f /etc/armbian-release ]; then
|
|||||||
_log "Armbian"
|
_log "Armbian"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts "fhinr" opt; do
|
while getopts "bfhinr" opt; do
|
||||||
_log "option ${opt}"
|
_log "option ${opt}"
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
|
b)
|
||||||
|
beta=1
|
||||||
|
;;
|
||||||
f)
|
f)
|
||||||
skipFlash=1
|
skipFlash=1
|
||||||
;;
|
;;
|
||||||
@ -213,6 +218,18 @@ case ${codename} in
|
|||||||
omvCodename="shaitan"
|
omvCodename="shaitan"
|
||||||
version=6
|
version=6
|
||||||
;;
|
;;
|
||||||
|
bookworm)
|
||||||
|
if [ ${beta} -eq 1 ]; then
|
||||||
|
omvCodename="sandworm"
|
||||||
|
version=7
|
||||||
|
else
|
||||||
|
_log "Unsupported version. Only Debian 10 (Buster) and 11 (Bullseye) are supported. Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
_log "Copying /etc/resolv.conf to ${resolvTmp} ..."
|
||||||
|
cp -fv /etc/resolv.conf "${resolvTmp}"
|
||||||
|
_log "$(cat /etc/resolv.conf)"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
_log "Unsupported version. Only Debian 10 (Buster) and 11 (Bullseye) are supported. Exiting..."
|
_log "Unsupported version. Only Debian 10 (Buster) and 11 (Bullseye) are supported. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
@ -331,6 +348,16 @@ if [[ ! "${omvInstall}" == "ii" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
omv-confdbadm populate 2>&1 | tee -a ${logfile}
|
omv-confdbadm populate 2>&1 | tee -a ${logfile}
|
||||||
|
omv-salt deploy run hosts 2>&1 | tee -a ${logfile}
|
||||||
|
fi
|
||||||
|
_log "Testing DNS..."
|
||||||
|
if ! ping -4 -q -c2 omv-extras.org 2>/dev/null; then
|
||||||
|
_log "DNS failing to resolve. Fixing ..."
|
||||||
|
if [ -f "${resolvTmp}" ]; then
|
||||||
|
_log "Reverting /etc/resolv.conf to saved copy ..."
|
||||||
|
rm -fv /etc/resolv.conf
|
||||||
|
cp -v "${resolvTmp}" /etc/resolv.conf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if openmediavault is install properly
|
# check if openmediavault is install properly
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user