File: cuttlefish-base.postinst

package info (click to toggle)
android-cuttlefish 1.0.1-0~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,192 kB
  • sloc: cpp: 39,149; sh: 2,523; javascript: 242; exp: 152; python: 125; makefile: 88
file content (30 lines) | stat: -rwxr-xr-x 605 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

case "$1" in
    (configure)
    # unlink if it's a symlink
    if [ -L /var/empty ]; then
        unlink /var/empty
    fi
    # delete if it's a file
    if [ -f /var/empty ]; then
        rm -rf /var/empty
    fi
    # guarantees it's a directory
    mkdir -p /var/empty
    if ! getent group cvdnetwork > /dev/null 2>&1
    then
        addgroup --system cvdnetwork
    fi

    # Create the kvm group when running inside a docker container.
    if test -f /.dockerenv && ( ! getent group kvm > /dev/null 2>&1 )
    then
        addgroup --system kvm
    fi
    ;;
esac

#DEBHELPER#