summaryrefslogtreecommitdiff
path: root/core/util-linux/util-linux.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-09-24 00:22:59 -0700
committerroot <root@rshg054.dnsready.net>2012-09-24 00:22:59 -0700
commit8f0a971364bf8fee254a13a94adf2bfa9173e804 (patch)
tree8b25f3fa8cb2e7b6b61d26a667d5f6e3ad967b70 /core/util-linux/util-linux.install
parenta7f8166c8968d3414378051d28dcfcc3e377837b (diff)
Mon Sep 24 00:22:58 PDT 2012
Diffstat (limited to 'core/util-linux/util-linux.install')
-rw-r--r--core/util-linux/util-linux.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/util-linux/util-linux.install b/core/util-linux/util-linux.install
index 90ce5bd73..35f80e2a2 100644
--- a/core/util-linux/util-linux.install
+++ b/core/util-linux/util-linux.install
@@ -1,3 +1,20 @@
+post_install() {
+ # create user for uuidd
+ if ! getent group uuidd >/dev/null; then
+ groupadd -r uuidd
+ fi
+
+ if ! getent passwd uuidd >/dev/null; then
+ useradd -r -s /sbin/nologin -d / -g uuidd uuidd
+ fi
+
+ # we don't want use systemd-tmpfiles here because
+ # the package dependency would create a circular dep.
+ if [ ! -d run/uuidd ]; then
+ install -o uuidd -g uuidd -dm755 run/uuidd
+ fi
+}
+
post_upgrade() {
if [ "$(vercmp $2 2.21.2-4)" -lt 0 ]; then
if [ -f /var/lib/hwclock/adjtime ]; then
@@ -7,4 +24,16 @@ post_upgrade() {
rmdir /var/lib/hwclock
fi
fi
+
+ post_install
+}
+
+post_remove() {
+ if getent passwd uuidd >/dev/null; then
+ userdel uuidd
+ fi
+
+ if getent group uuidd >/dev/null; then
+ userdel uuidd
+ fi
}