98 lines
3.0 KiB
Plaintext
98 lines
3.0 KiB
Plaintext
|
#!/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<72>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 <20>nderung von: $Author: kueller $
|
|||
|
#Datum der letzten <20>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
|