summaryrefslogtreecommitdiff
path: root/pcr/memlockd/memlockd.install
blob: a744f441a29089e71c27d3580888e4bfb2c6b7ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# arg 1:  the new package version
post_install() {
  getent group memlockd >/dev/null ||
    groupadd --system memlockd

  getent passwd memlockd >/dev/null ||
    useradd --system \
            --gid memlockd \
            --shell /bin/false \
            --no-create-home \
            --home /usr/lib/memlockd \
            memlockd

  chown memlockd:memlockd /usr/lib/memlockd /etc/memlockd.d
}

# arg 1:  the old package version
pre_remove() {
  userdel memlockd &>/dev/null
  groupdel memlockd &>/dev/null
}