dbus landet im jeweiligen init package (sysvinit/upstart)
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_sysvinit@5525 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
450357bddc
commit
df58fdf1ba
97
etc/init.d/dbus
Executable file
97
etc/init.d/dbus
Executable file
@ -0,0 +1,97 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
||||||
|
#dieses Framework wird im CVS Repository
|
||||||
|
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
|
||||||
|
#
|
||||||
|
#Lage dieser Datei im Archiv: $Source$
|
||||||
|
#
|
||||||
|
#(c) 2003 Harald Kueller, Germany
|
||||||
|
#This program is free software; you can redistribute it and/or
|
||||||
|
#modify ist under the terms of the GNU General Public License
|
||||||
|
#as published by the Free Software Foundation; either version
|
||||||
|
#2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
#This program is distributed in the hope that it will be useful,
|
||||||
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#You should have received a copy of the GNU General Public License
|
||||||
|
#along with this program; if not write to the Free Software Foundation,
|
||||||
|
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
#InitScript zum Start des Daemons:
|
||||||
|
#
|
||||||
|
#Letzte Änderung von: $Author: kueller $
|
||||||
|
#Datum der letzten Änderung: $Date: 2009-04-27 13:14:47 +0200 (Mo, 27 Apr 2009) $
|
||||||
|
#Version der Datei: $Revision: 4633 $
|
||||||
|
#
|
||||||
|
#$Log$
|
||||||
|
#Revision 1.7 2007/04/28 20:13:35 kueller
|
||||||
|
#Entspricht eigentlich wieder der Version 1.5 -> Rev. 1.6 war ein
|
||||||
|
#Fehlerhafter checkin eines Files fuer /etc/sysconfig/profile.d,
|
||||||
|
#nicht fuer /etc/init.d
|
||||||
|
#
|
||||||
|
#Revision 1.5 2007/04/13 09:22:39 kueller
|
||||||
|
#Anpassung des startup -> Dbus wird nun mit systemweiter Konfiguration gestartet
|
||||||
|
#neue postinstall installiert den in der neuen version erwarteten user messagebus
|
||||||
|
#
|
||||||
|
#Revision 1.4 2007/04/12 10:01:17 kueller
|
||||||
|
#Startup fehler wegen vorhandenem /var/run/dbus/pid nach
|
||||||
|
#system absturz wird nun aufgefangen
|
||||||
|
#
|
||||||
|
#Revision 1.3 2007/02/18 08:59:04 kueller
|
||||||
|
#PATH erweitert, so das dbus-launch, sowie die zugehoerigen daemons gefunden
|
||||||
|
#werden.
|
||||||
|
#
|
||||||
|
#Revision 1.2 2006/07/18 13:26:27 kueller
|
||||||
|
#Aufgrund neuer configure optionen (sysstatedir) ist /var/run/dbus nun ein
|
||||||
|
#verzeichniss. initscript entsprechend geaendert. Ausserdem wird mehrmaliges
|
||||||
|
#aufrufen mit "stop" option jetzt abgefangen
|
||||||
|
#
|
||||||
|
#Revision 1.1.1.1 2006/07/18 12:54:21 kueller
|
||||||
|
#Startup Script fuer dbus
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
source /etc/init.d/functions
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
if [ -f /var/run/dbus/pid ]; then
|
||||||
|
if [ "`pgrep dbus-daemon`" == "`cat /var/run/dbus/pid`" ]; then
|
||||||
|
echo "The dbus deamon is already running with pid `cat /var/run/dbus/pid`"
|
||||||
|
exit 10
|
||||||
|
else
|
||||||
|
rm /var/run/dbus/*
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
export PATH=$PATH:/usr/X11R7/bin
|
||||||
|
echo -n "Starting dbus messaging system"
|
||||||
|
dbus-daemon --system
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
if [ ! -f /var/run/dbus/pid ]; then
|
||||||
|
echo "dbus is not running!"
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
echo -n "Stopping dbus messaging system"
|
||||||
|
kill `cat /var/run/dbus/pid` &&
|
||||||
|
rm /var/run/dbus/pid &&
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
@ -70,6 +70,7 @@ cd ..
|
|||||||
|
|
||||||
for i in 0 6; do
|
for i in 0 6; do
|
||||||
cd rc$i.d
|
cd rc$i.d
|
||||||
|
ln -s ../dbus K74dbus
|
||||||
ln -s ../ifup K80ifup
|
ln -s ../ifup K80ifup
|
||||||
ln -s ../sendsignals K80sendsignals
|
ln -s ../sendsignals K80sendsignals
|
||||||
ln -s ../loadmodules K87loadmodules
|
ln -s ../loadmodules K87loadmodules
|
||||||
@ -80,6 +81,7 @@ done
|
|||||||
cd rc0.d
|
cd rc0.d
|
||||||
ln -s ../halt S99halt
|
ln -s ../halt S99halt
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cd rc6.d
|
cd rc6.d
|
||||||
ln -s ../reboot S99reboot
|
ln -s ../reboot S99reboot
|
||||||
cd ..
|
cd ..
|
||||||
@ -92,6 +94,7 @@ for i in 1 2 3 4 5; do
|
|||||||
ln -s ../ifup S10ifup
|
ln -s ../ifup S10ifup
|
||||||
ln -s ../routing S11routing
|
ln -s ../routing S11routing
|
||||||
ln -s ../install S11install
|
ln -s ../install S11install
|
||||||
|
ln -s ../dbus S12dbus
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
ln -s ../init.d init.d
|
ln -s ../init.d init.d
|
||||||
|
Loading…
Reference in New Issue
Block a user