git.slaskete.net
/
einar-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d0516fb
)
Add test for foomatic-filters; fix notices
author
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Mon, 29 Jul 2019 19:24:13 +0000
(21:24 +0200)
committer
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Mon, 29 Jul 2019 19:24:13 +0000
(21:24 +0200)
addfollowmeprint.sh
patch
|
blob
|
history
diff --git
a/addfollowmeprint.sh
b/addfollowmeprint.sh
index 035767d74655e860fe0606b66f7bb70fae2387b5..53937aa03d4783b97b1408a29a37f0a5e8d57b6b 100755
(executable)
--- a/
addfollowmeprint.sh
+++ b/
addfollowmeprint.sh
@@
-139,7
+139,7
@@
if [ "${Uname}" = "linux" ]; then
if ! sudo rpm -q OpenPrintingPPDs-postscript >/dev/null 2>&1; then
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo zypper install OpenPrintingPPDs-postscript"
if ! sudo rpm -q OpenPrintingPPDs-postscript >/dev/null 2>&1; then
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo zypper install OpenPrintingPPDs-postscript"
- printerror "first, or use the generic
driver
instead."
+ printerror "first, or use the generic
model
instead."
exit 1
else
DriverPath="OpenPrintingPPDs/postscript/Ricoh-MP_C6003.Postscript-Ricoh.ppd.gz"
exit 1
else
DriverPath="OpenPrintingPPDs/postscript/Ricoh-MP_C6003.Postscript-Ricoh.ppd.gz"
@@
-151,7
+151,7
@@
if [ "${Uname}" = "linux" ]; then
if ! sudo rpm -q OpenPrintingPPDs-ghostscript >/dev/null 2>&1; then
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo zypper install OpenPrintingPPDs-ghostscript"
if ! sudo rpm -q OpenPrintingPPDs-ghostscript >/dev/null 2>&1; then
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo zypper install OpenPrintingPPDs-ghostscript"
- printerror "first, or use the generic
driver
instead."
+ printerror "first, or use the generic
model
instead."
exit 1
else
if [ "${Model}" = "ricoh" ]; then
exit 1
else
if [ "${Model}" = "ricoh" ]; then
@@
-169,7
+169,7
@@
if [ "${Uname}" = "linux" ]; then
if ! sudo rpm -q foomatic-db-ppds 2>&1; then
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo dnf install foomatic-db-ppds"
if ! sudo rpm -q foomatic-db-ppds 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
driver
instead."
+ printerror "first, or use the generic
model
instead."
exit 1
else
if [ "${Driver}" = "postscript" ]; then
exit 1
else
if [ "${Driver}" = "postscript" ]; then
@@
-181,10
+181,16
@@
if [ "${Uname}" = "linux" ]; then
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
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
+ 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
printerror "You don't seem to have the correct printer drivers installed, please run:"
printerror " sudo yum install foomatic-db-ppds"
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
driver
instead."
+ printerror "first, or use the generic
model
instead."
exit 1
else
if [ "${Driver}" = "postscript" ]; then
exit 1
else
if [ "${Driver}" = "postscript" ]; then
@@
-199,7
+205,7
@@
if [ "${Uname}" = "linux" ]; then
if ! sudo dpkg -s openprinting-ppds > /dev/null 2>&1; then
printerror "You must have the correct printer drivers installed, please run:"
printerror " sudo apt-get install openprinting-ppds"
if ! sudo dpkg -s openprinting-ppds > /dev/null 2>&1; then
printerror "You must have the correct printer drivers installed, please run:"
printerror " sudo apt-get install openprinting-ppds"
- printerror "first, or use the generic
driver
instead."
+ printerror "first, or use the generic
model
instead."
exit 1
else
if [ "${Driver}" = "postscript" ]; then
exit 1
else
if [ "${Driver}" = "postscript" ]; then
@@
-331,4
+337,8
@@
if ! sudo lpadmin -d ${QueueName}; then
exit 1
fi
exit 1
fi
-echo "Printer successfully installed. You may need to restart cups for the changes to take effect."
+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