summaryrefslogtreecommitdiff
path: root/pcr/memlockd/memlockd.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/memlockd/memlockd.install')
-rw-r--r--pcr/memlockd/memlockd.install22
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
+}