From b82d011a943c2259c5b4e795485320ca55995e32 Mon Sep 17 00:00:00 2001 From: kueller Date: Tue, 20 Apr 2010 16:15:14 +0000 Subject: [PATCH] Vorbereitung auf upstart git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_hald@5536 504e572c-2e33-0410-9681-be2bf7408885 --- etc/init/hald.conf | 24 ++++++++++++++++++++++++ init/genpkg | 32 +++++++++++++++++--------------- 2 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 etc/init/hald.conf diff --git a/etc/init/hald.conf b/etc/init/hald.conf new file mode 100644 index 0000000..bdd0e81 --- /dev/null +++ b/etc/init/hald.conf @@ -0,0 +1,24 @@ +description "Hardware Abstraction Layer daemon startup" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started dbus)) +stop on runlevel [S016] + +console none + +pre-start script + if [ ! -f /usr/share/pci.ids ]; then + if [ -f /usr/share/pci.ids.gz ]; then + gzip -d -c /usr/share/pci.ids.gz >/usr/share/pci.ids + fi + fi + if [ ! -f /usr/share/usb.ids ]; then + if [ -f /usr/share/usb.ids.gz ]; then + gzip -d -c /usr/share/usb.ids.gz >/usr/share/usb.ids + fi + fi +end script + +exec /usr/sbin/hald --daemon=no --verbose=yes --use-syslog diff --git a/init/genpkg b/init/genpkg index 48a82b7..23b72eb 100644 --- a/init/genpkg +++ b/init/genpkg @@ -25,18 +25,20 @@ # # -WDIR=`pwd` -cd etc/init.d -chmod 755 dbus -mkdir rc{0,1,2,3,4,5,6}.d -for i in 0 1 6; do - cd rc$i.d - ln -s ../hald K70hald - cd .. -done -for i in 2 3 4 5; do - cd rc$i.d - ln -s ../hald S14hald - cd .. -done -cd $WDIR +if [ -d /var/install/sysvinit* ]; then + WDIR=`pwd` + cd etc/init.d + chmod 755 dbus + mkdir rc{0,1,2,3,4,5,6}.d + for i in 0 1 6; do + cd rc$i.d + ln -s ../hald K70hald + cd .. + done + for i in 2 3 4 5; do + cd rc$i.d + ln -s ../hald S14hald + cd .. + done + cd $WDIR +fi