File: fastrpc-support.postinst

package info (click to toggle)
fastrpc 1.0.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 2,816 kB
  • sloc: ansic: 30,070; makefile: 230; sh: 31
file content (24 lines) | stat: -rw-r--r-- 678 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
#!/bin/sh

set -e

if [ "$1" = "configure" ]; then
    if ! getent group fastrpc >/dev/null 2>&1; then
        addgroup --system --quiet fastrpc
    fi
    if ! getent passwd fastrpc >/dev/null 2>&1; then
        adduser --system --quiet --ingroup fastrpc \
            --no-create-home --home /nonexistent   \
            fastrpc
    fi

    if which udevadm >/dev/null 2>&1 ; then
        udevadm control --reload-rules || true
        for f in $(find /dev -name 'fastrpc-*'); do
            udevadm trigger --subsystem-match=misc --action=add --name-match=$f || true
        done
        udevadm trigger --subsystem-match=dma_heap --action=add || true
    fi
fi

#DEBHELPER#