From b7a566d9e3c6385f06ab53c1f669829df597eecc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Einar=20J=C3=B8rgen=20Haraldseid?= Date: Mon, 29 Jul 2019 21:51:26 +0200 Subject: [PATCH 1/1] Fix some tests --- addfollowmeprint.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addfollowmeprint.sh b/addfollowmeprint.sh index 53937aa..dfd6f9a 100755 --- a/addfollowmeprint.sh +++ b/addfollowmeprint.sh @@ -166,7 +166,7 @@ if [ "${Uname}" = "linux" ]; then if [ "${Model}" = "ricoh" ]; then # This should match Fedora and other modern rpm based systems that have dnf as the primary package manager if command -v dnf >/dev/null 2>&1; then - if ! sudo rpm -q foomatic-db-ppds 2>&1; then + if ! sudo rpm -q foomatic-db-ppds > /dev/null 2>&1; then printerror "You don't seem to have the correct printer drivers installed, please run:" printerror " sudo dnf install foomatic-db-ppds" printerror "first, or use the generic model instead." @@ -178,16 +178,15 @@ if [ "${Uname}" = "linux" ]; then DriverPath="foomatic-db-ppds/Ricoh/PXL/Ricoh-MP_C6003_PXL.ppd.gz" fi fi - fi # This should match CentOS, RHEL and other RHEL based distros that have yum as the primary package manager - if command -v yum >/dev/null 2>&1; then - if ! sudo rpm -q foomatic-filters >/dev/null 2>&1; then + elif command -v yum >/dev/null 2>&1; then + if ! sudo rpm -q foomatic-filters > /dev/null 2>&1; then printerror "You don't seem to have the foomatic-filters package installed, please run:" printerror " sudo yum install foomatic-filters" printerror "first, or use the generic model instead." exit 1 fi - if ! sudo rpm -q foomatic-db-ppds >/dev/null 2>&1; then + if ! sudo rpm -q foomatic-db-ppds > /dev/null 2>&1; then printerror "You don't seem to have the correct printer drivers installed, please run:" printerror " sudo yum install foomatic-db-ppds" printerror "first, or use the generic model instead." @@ -341,4 +340,4 @@ echo "Printer successfully installed." if [ "${Uname}" = "linux" ] && [ "${Plaintext}" != "YES" ]; then echo -e "\nPlease note: due to the way credentials are stored and accessed on Linux, some print operations will still halt for credentials, notably the \"Print test page\" function. In those cases, supply your normal NTNU username and password." -fi \ No newline at end of file +fi -- 2.30.2