diff options
author | Didier Raboud <didier@raboud.com> | 2010-05-23 00:07:10 +0200 |
---|---|---|
committer | Didier Raboud <didier@raboud.com> | 2010-05-23 00:07:10 +0200 |
commit | f56211f0ff4ddf9371ebc4c31e8f95df1fc81a5c (patch) | |
tree | a24f15ea2fc96e0688e96c58e35dde7adeaef3fb /debian/foomatic-filters.config | |
parent | b834bd56528993fa05a5645da808227aee3e9de7 (diff) | |
parent | 014f0e14a3c6a044d99a67c8f4e1c4065452479e (diff) |
Merge branch 'upstream'
Conflicts:
debian/README.Debian
debian/changelog
debian/control
debian/copyright
debian/foomatic-filters.config
debian/foomatic-filters.postinst
debian/foomatic-filters.postrm
debian/foomatic-filters.templates
debian/parseconfig.pl
debian/po/de.po
debian/po/fr.po
debian/po/ja.po
debian/po/nl.po
debian/po/pt_BR.po
debian/po/templates.pot
debian/po/tr.po
debian/rules
Diffstat (limited to 'debian/foomatic-filters.config')
-rw-r--r-- | debian/foomatic-filters.config | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/debian/foomatic-filters.config b/debian/foomatic-filters.config deleted file mode 100644 index 2e5bfd9..0000000 --- a/debian/foomatic-filters.config +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash -e -# -# Debconf configuration script for the foomatic-filters package -# - -. /usr/share/debconf/confmodule - -db_version 2.0 -db_capb backup -db_title Foomatic Printer Filter Configuration - -declare -i state=1 backup=0 - -function parseconfig -{ - if [ -e /usr/share/foomatic/parseconfig.pl ]; then - db_clear - eval $(/usr/bin/perl /usr/share/foomatic/parseconfig.pl) - db_set foomatic-filters/config_parsed true - else - db_set foomatic-filters/config_parsed false - fi -} - -################# -### Main loop ### -################# - -parseconfig - -if [ -f /etc/foomatic/defaultspooler ]; then - db_set foomatic-filters/spooler `cat /etc/foomatic/defaultspooler`; -else - # Try to detect from installed packages; use the one found first in - # the list - spooler=`dpkg-query --showformat='${Package} ${Status}' -W cupsys lpr lprng rlpr lpr-ppd pdq ppr 2>/dev/null | grep ' installed$' | cut -d' ' -f1 | head -1` - if [ "$spooler" = cupsys ]; then - spooler=cups - elif [ "$spooler" = lpr-ppd -o "$spooler" = lpr -o "$spooler" = rlpr ]; then - spooler=lpd - fi - if [ "$spooler" ]; then - db_set foomatic-filters/spooler $spooler - else - # This script may be run before dpkg gets around to installing - # a spooler if it is done in the same apt run, so see if anything - # is in the "install" state. - spooler=`dpkg-query --showformat='${Package} ${Status}' -W cupsys lpr lprng rlpr lpr-ppd pdq ppr 2>/dev/null | grep ' install ' | cut -d' ' -f1 | head -1` - if [ "$spooler" = "cupsys" ]; then - spooler=cups - elif [ "$spooler" = lpr-ppd -o "$spooler" = lpr -o "$spooler" = rlpr ]; then - spooler=lpd - fi - if [ "$spooler" ]; then - db_set foomatic-filters/spooler $spooler - fi - fi -fi - -while ((state)); do - case $state in - 1) - db_input low foomatic-filters/spooler || true - ;; - 2) - db_input low foomatic-filters/filter_debug || true - ;; - 3) - db_get foomatic-filters/spooler; - if [ "$RET" = cups ]; then - ((backup ? state-- : state++ )) || true - continue - else - db_input low foomatic-filters/textfilter || true - fi - ;; - 4) - db_get foomatic-filters/textfilter; - if [ "$RET" = Custom ]; then - db_input low foomatic-filters/custom_textfilter || true - else - ((backup ? state-- : state++)) || true - continue - fi - ;; - 5) - db_get foomatic-filters/spooler; - if [ "$RET" = cups ]; then - db_input low foomatic-filters/ps_accounting || true - else - ((backup ? state-- : state++)) || true - continue - fi - ;; - *) - break; - ;; - esac - backup=0 - db_go || backup=1 - ((backup ? state-- : state++)) -done - -db_stop - -### Local Variables: -### tab-width: 4 -### End: |