
| Current Path : /var/lib/dpkg/info/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/lib/dpkg/info/printer-driver-cups-pdf.prerm |
#!/bin/sh # [prerm] for cups-pdf # # COPYRIGHT # © 2003-2015 Martin-Éric Racine <martin-eric.racine@iki.fi> # © 2009,2011 Till Kamppeter <till.kamppeter@gmail.com> # # LICENSE # This package is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License or (at # your option) any later version. # set -e case "$1" in remove) # Ensure that CUPS is running before we manipulate its queues. if [ -f /etc/init.d/cups ] then invoke-rc.d cups force-reload || invoke-rc.d cups start || : fi # Wait until CUPS has reloaded its configuration. if lpstat -h localhost -r 2>/dev/null | grep -q not then t=0 while lpstat -h localhost -r 2>/dev/null | grep -q not do t=$(($t + 1)) if [ $t = 10 ] then echo "CUPS failed to reload its configuration!" break fi sleep 1 done fi # Purge all PDF queues and disable them. for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3) do echo | cupsreject -h localhost $queue 2>/dev/null || : echo | cupsdisable -h localhost $queue 2>/dev/null || : echo | lpadmin -h localhost -x $queue 2>/dev/null || : done ;; upgrade|deconfigure|failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac exit 0