aboutsummaryrefslogtreecommitdiff
path: root/dbus/dbus/post-install
blob: 5c47035c45e1c6f8c89fda2a32bd21253ad0ec30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh -e

mkdir -p "$CPT_ROOT/var/lib/dbus" "$CPT_ROOT/etc/dbus-1/session.d"

chr() {
    # Run in chroot if CPT_ROOT variable exists
    if [ "$CPT_ROOT" ]; then
        chroot "$CPT_ROOT" "$@"
    else
        "$@"
    fi
}

grep -q ^dbus: "$CPT_ROOT/etc/passwd" || {
    chr addgroup -g 22 -S dbus
    chr adduser  -u 22 -S -H -G dbus dbus
}
chown root:dbus "$CPT_ROOT/usr/libexec/dbus-daemon-launch-helper"
chmod 4750      "$CPT_ROOT/usr/libexec/dbus-daemon-launch-helper"
chr /usr/bin/dbus-uuidgen --ensure || :