From eeabf9d74afe618fafe9fad31f4b6d9825e22631 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 30 Aug 2016 23:34:19 -0700 Subject: [PATCH 1/3] Fix PATH on Ubuntu systems if dpkg is likely to fail during AUTOINSTALL --- plexupdate.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plexupdate.sh b/plexupdate.sh index 3d55aad..0043f98 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -548,6 +548,11 @@ if [ ! -z "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then fi if [ "${AUTOINSTALL}" = "yes" ]; then + if ! hash ldconfig 2>/dev/null && [ -x /sbin/ldconfig -a "${DISTRO}" = "ubuntu" ]; then + export PATH=$PATH:/sbin + fi + # no elif since DISTRO_INSTALL will produce error output for us + ${DISTRO_INSTALL} "${DOWNLOADDIR}/${FILENAME}" fi From 2f0d3be8e4b5449b620622fc031135092ee64e33 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Thu, 1 Sep 2016 13:17:03 -0700 Subject: [PATCH 2/3] Remove redundant ldconfig check --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 0043f98..e343fab 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -548,7 +548,7 @@ if [ ! -z "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then fi if [ "${AUTOINSTALL}" = "yes" ]; then - if ! hash ldconfig 2>/dev/null && [ -x /sbin/ldconfig -a "${DISTRO}" = "ubuntu" ]; then + if ! hash ldconfig 2>/dev/null && [ -a "${DISTRO}" = "ubuntu" ]; then export PATH=$PATH:/sbin fi # no elif since DISTRO_INSTALL will produce error output for us From a9992fa10f7145d175875ef2d46e7b44a8a578e3 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Thu, 1 Sep 2016 13:23:29 -0700 Subject: [PATCH 3/3] Fix typo in autoinstall --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index e343fab..d82cddf 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -548,7 +548,7 @@ if [ ! -z "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then fi if [ "${AUTOINSTALL}" = "yes" ]; then - if ! hash ldconfig 2>/dev/null && [ -a "${DISTRO}" = "ubuntu" ]; then + if ! hash ldconfig 2>/dev/null && [ "${DISTRO}" = "ubuntu" ]; then export PATH=$PATH:/sbin fi # no elif since DISTRO_INSTALL will produce error output for us