File: docker.io.postinst

package info (click to toggle)
docker.io 27.5.1%2Bdfsg4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 67,384 kB
  • sloc: sh: 5,847; makefile: 1,146; ansic: 664; python: 162; asm: 133
file content (31 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (10)
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
#!/bin/sh
set -e

case "$1" in
    configure)
        if [ -z "$2" ]; then
            # Make sure the "docker" system group exists for "docker.socket"
	    # to apply it as the group on "docker.sock"
            if ! getent group docker >/dev/null 2>&1 ; then
                addgroup --system docker
            fi
        fi

        # Ensure config directory permissions
        #  On a fresh install, $2 = '' and dpkg "le-nl" treat that as a
        #  greater version, so the body is not executed.
        if dpkg --compare-versions "$2" le-nl '1.11.2~ds1-1'; then
            if [ "$(stat -c '%a' /etc/docker)" = '700' ]; then
                chmod 0755 /etc/docker
            fi
        fi
        ;;
    abort-*)
        # How'd we get here??
        exit 1
        ;;
    *)
        ;;
esac

#DEBHELPER#