#!/bin/sh set -e case "$1" in configure) # create the scanner group if it isn't already there # We need to check for the existence of the group to avoid system/non-system # group discrepencies. (Bug #648287, LP: #989921) if ! getent group scanner >/dev/null; then addgroup --quiet --system scanner fi # ...create colord user if it isn't already there... adduser --system --group --home /var/lib/colord \ --quiet --gecos "colord colour management daemon" colord # ...add system-wide icc profiles directory... mkdir -p /var/lib/colord/icc # ...finally, ensure /var/lib/colord has the right permissions chown colord:colord /var/lib/colord /var/lib/colord/icc # Restore selinux context (Bug #695085) if which restorecon >/dev/null 2>&1; then restorecon /var/lib/colord /var/lib/colord/icc fi ;; esac # Automatically added by dh_installtmpfiles/13.3.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # In case this system is running systemd, we need to ensure that all # necessary tmpfiles (if any) are created before starting. if [ -d /run/systemd/system ] ; then systemd-tmpfiles --create colord.conf >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installdeb/13.3.1 dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/colormgr-completion.bash 1.0.3-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/colord.conf 1.2.12-1\~ colord -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.ColorManager.conf 1.4.3-4\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.colord-sane.conf 1.0.3-1\~ -- "$@" # End automatically added section # Automatically added by dh_installsystemd/13.3.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'colord.service' >/dev/null || true fi fi # End automatically added section exit 0