mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 21:03:19 -07:00
Use dnf on newer redhat systems
This commit is contained in:
parent
1b771b4cef
commit
8134bfdee0
1 changed files with 7 additions and 3 deletions
|
@ -67,7 +67,7 @@ WGETOPTIONS="" # extra options for wget. Used for progress bar.
|
||||||
CHECKUPDATE=yes
|
CHECKUPDATE=yes
|
||||||
|
|
||||||
# Default options for package managers, override if needed
|
# Default options for package managers, override if needed
|
||||||
REDHAT_INSTALL="yum -y install"
|
REDHAT_INSTALL="dnf -y install"
|
||||||
DEBIAN_INSTALL="dpkg -i"
|
DEBIAN_INSTALL="dpkg -i"
|
||||||
DISTRO_INSTALL=""
|
DISTRO_INSTALL=""
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ fi
|
||||||
# Allow manual control of configfile
|
# Allow manual control of configfile
|
||||||
if [ ! -z "${CONFIGFILE}" ]; then
|
if [ ! -z "${CONFIGFILE}" ]; then
|
||||||
if [ -f "${CONFIGFILE}" ]; then
|
if [ -f "${CONFIGFILE}" ]; then
|
||||||
info "Using configuration: ${CONFIGFILE}" #>/dev/null
|
info "Using configuration: ${CONFIGFILE}"
|
||||||
source "${CONFIGFILE}"
|
source "${CONFIGFILE}"
|
||||||
else
|
else
|
||||||
error "Cannot load configuration ${CONFIGFILE}"
|
error "Cannot load configuration ${CONFIGFILE}"
|
||||||
|
@ -471,7 +471,11 @@ if [ -z "${DISTRO_INSTALL}" ]; then
|
||||||
REDHAT=yes
|
REDHAT=yes
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
BUILD="linux-ubuntu-${ARCH}"
|
||||||
DISTRO="redhat"
|
DISTRO="redhat"
|
||||||
DISTRO_INSTALL="${REDHAT_INSTALL}"
|
if ! hash dnf 2>/dev/null; then
|
||||||
|
DISTRO_INSTALL="${REDHAT_INSTALL/dnf/yum}"
|
||||||
|
else
|
||||||
|
DISTRO_INSTALL="${REDHAT_INSTALL}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
REDHAT=no
|
REDHAT=no
|
||||||
BUILD="linux-ubuntu-${ARCH}"
|
BUILD="linux-ubuntu-${ARCH}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue