File: colord.postinst

package info (click to toggle)
colord 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,488 kB
  • sloc: ansic: 68,616; sh: 4,784; xml: 2,616; makefile: 1,921
file content (37 lines) | stat: -rw-r--r-- 973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

set -e

dpkg-maintscript-helper rm_conffile \
    /etc/colord.conf 1.2.12-1~ colord -- "$@"


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 colord \
	    --quiet --gecos "colord colour management daemon"

# ...add system-wide icc profiles directory...
        mkdir -p /var/lib/colord/icc
# ...finally, ensure /var/lib/colord has the right permissions
	chown -R colord:colord /var/lib/colord
# Restore selinux context (Bug #695085)
        if which restorecon >/dev/null 2>&1; then
            restorecon /var/lib/colord /var/lib/colord/icc
        fi

	;;
esac	

#DEBHELPER#

exit 0