X-Git-Url: https://git.slaskete.net/einar-bin/blobdiff_plain/b7a566d9e3c6385f06ab53c1f669829df597eecc..7b4166a3b5fb824f895e9254a5d26584df7b4ca0:/addfollowmeprint.sh?ds=sidebyside diff --git a/addfollowmeprint.sh b/addfollowmeprint.sh index dfd6f9a..3807927 100755 --- a/addfollowmeprint.sh +++ b/addfollowmeprint.sh @@ -1,14 +1,16 @@ #!/bin/bash -# This script installs the FollowMe print queue at NTNU on Linux (and possibly Mac) systems. +# This script installs the FollowMe print queue at NTNU on Linux and possibly Mac systems. # The targeted and tested distros are: Debian, Ubuntu (and derivates), Fedora, CentOS, OpenSUSE and Mint # Copyright © 2017-2019 einar.haraldseid@ntnu.no +# LibreOffice has some problems on Linux, see https://bugs.documentfoundation.org/show_bug.cgi?id=126604 + # Documentation function usage { echo "Usage: ./$(basename "${0}") [OPTIONS]" echo "Options:" echo " -m, --model {ricoh|generic} Printer model to install (default: generic)" - echo " -d, --driver {pcl,postscript} Printer driver to use (default: postscript)" + echo " -d, --driver {pcl|postscript} Printer driver to use (default: postscript)" echo " -f, --force Force running script as if on Linux systems" echo " -p, --plaintext Store credentials as plaintext in /etc/cups/printers.conf (Linux only)" echo " -h, --help Display this help text" @@ -257,7 +259,7 @@ if [ "${Uname}" = "darwin" ]; then fi ShareFound=$(smbutil view "//${Workgroup};${Username}:${Password}@${PrintServer}" 2>/dev/null | grep ${PrintFile} | cut -d " " -f 1) if [ "${ShareFound}" != "${PrintFile}" ]; then - printerror "Could not find printer share called ${PrintFile} on the server" + printerror "Could not find printer share called ${PrintFile} on the server" printerror "This script must be broken or outdated. Please contact orakel@ntnu.no for further assistance." exit 1 fi @@ -275,6 +277,7 @@ if [ "${Uname}" = "linux" ]; then else PrinterShare="smb://${Workgroup}/${PrintServer}/${PrintFile}" AuthInfo="username,password" + echo -e "\nNOTE: 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 and printing from LibreOffice. In those cases, supply your normal NTNU username and password. If this becomes too tedious, you can try using the --plaintext option.\n" fi if ! sudo lpadmin -p ${QueueName} \ -D "FollowMe print queue at NTNU" \ @@ -337,7 +340,3 @@ if ! sudo lpadmin -d ${QueueName}; then fi 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