diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-11-05 13:29:23 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-12-22 10:06:23 -0300 |
commit | a2165b238194d7b710665b58b0701a2cfb240bb4 (patch) | |
tree | 68346655a5aef8af2483ea8a4292b6d90eae90cc /pcr/memlockd/memlockd.install | |
parent | 973c8ea201b35d7d22d19019a028152dfad360ce (diff) |
memlockd
Diffstat (limited to 'pcr/memlockd/memlockd.install')
-rw-r--r-- | pcr/memlockd/memlockd.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pcr/memlockd/memlockd.install b/pcr/memlockd/memlockd.install new file mode 100644 index 000000000..a744f441a --- /dev/null +++ b/pcr/memlockd/memlockd.install @@ -0,0 +1,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 +} |