summaryrefslogtreecommitdiffstats
path: root/hal/pre-install
diff options
context:
space:
mode:
Diffstat (limited to 'hal/pre-install')
-rw-r--r--hal/pre-install14
1 files changed, 14 insertions, 0 deletions
diff --git a/hal/pre-install b/hal/pre-install
new file mode 100644
index 000000000..dd3fc113e
--- /dev/null
+++ b/hal/pre-install
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# check for haldaemon group or add one
+getent group haldaemon || /usr/sbin/groupadd -g 19 haldaemon
+
+# check for plugdev group or add one
+getent group plugdev || /usr/sbin/groupadd -g 63 plugdev
+
+# check for haldaemon user or add one
+getent passwd haldaemon || /usr/sbin/useradd -g haldaemon -u 19 -d /var/empty -s /bin/false -c "HAL Daemon User" haldaemon
+
+# lock the account
+/bin/passwd -l haldaemon
+