summaryrefslogtreecommitdiff
path: root/debian/cups-client.postinst
diff options
context:
space:
mode:
authormartin@piware.de <>2008-05-23 10:14:05 +0200
committermartin@piware.de <>2008-05-23 10:14:05 +0200
commit9b0fd75c0491a094743dbe4684a367113c651f45 (patch)
tree57a2410c83130540055c08ec7ded022867973e6a /debian/cups-client.postinst
parentda4b8cdf48ba4dff693687372c1546cf88a25a5f (diff)
* Rename the package to cups. This is the proper upstream name. Upstream has
made it clear that the usual distro patches are not a trademark violation. This unbreaks all the documentation out there, which refers to "cups", not "cupsys" (including names of the init script), as well as unbreaks dependencies of openprinting.org's LSB printer driver packages. (Closes: #482296, LP: #233790) * debian/cups.{config,postinst}: Remove some old cruft. * debian/cups.preinst: Move conffiles to new names on upgrades, in a dpkg conffile question avoiding manner.
Diffstat (limited to 'debian/cups-client.postinst')
-rw-r--r--debian/cups-client.postinst52
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/cups-client.postinst b/debian/cups-client.postinst
new file mode 100644
index 000000000..108c9b82a
--- /dev/null
+++ b/debian/cups-client.postinst
@@ -0,0 +1,52 @@
+#! /bin/sh
+# postinst script for cups
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ if [ -z "`getent group lpadmin`" ]; then
+ addgroup --system lpadmin
+ fi
+
+ chown root:lpadmin /usr/bin/lppasswd
+ chmod u+s /usr/bin/lppasswd
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+