summaryrefslogtreecommitdiffstats
path: root/hal/haldaemon
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
committertnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
commit3f57a7f93b3e7550cbd73036f6a56654e17d1d5c (patch)
tree819b14ab0377fe2054fe59866669d904e9e0b4b5 /hal/haldaemon
parentc9972ec7f32bf9d37388e853fe9bf633e242d05a (diff)
downloadnutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.gz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.bz2
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.xz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.zip
split de git pakxe et NuTyX-extra
Diffstat (limited to 'hal/haldaemon')
-rwxr-xr-xhal/haldaemon47
1 files changed, 47 insertions, 0 deletions
diff --git a/hal/haldaemon b/hal/haldaemon
new file mode 100755
index 000000000..64affe7cf
--- /dev/null
+++ b/hal/haldaemon
@@ -0,0 +1,47 @@
+#!/bin/sh
+# Begin $rc_base/init.d/haldaemon
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
+
+#$LastChangedBy: randy $
+#$Date: 2007/09/27 15:12:01 $
+# $Id: haldaemon,v 1.1 2007/09/27 15:12:01 install Exp $
+. /etc/sysconfig/rc
+. $rc_functions
+newid=19
+newuser=haldaemon
+newgroup=haldaemon
+getent group $newgroup > /dev/null || /usr/sbin/groupadd -g $newid $newgroup
+getent passwd $newuser > /dev/null || /usr/sbin/useradd -g $newgroup \
+-u $newid -s /bin/false -d /dev/null -u $newid -c "HAL Daemon User" $newuser
+getent group halusers > /dev/null || /usr/sbin/groupadd -g 61 halusers
+
+case "$1" in
+ start)
+ boot_mesg "Starting the HAL Daemon..."
+ loadproc /usr/sbin/hald --use-syslog
+ ;;
+
+ stop)
+ boot_mesg "Stopping the HAL Daemon..."
+ killproc /usr/sbin/hald
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ status)
+ statusproc /usr/sbin/hald
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/haldaemon