Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37405248
en ru br
Репозитории ALT
S:1.14.10-alt1
5.1: 1.2.16-alt2
4.1: 1.2.12-alt1.M41.1
+updates:1.2.4-alt0.M41.1
4.0: 1.0.3-alt1.M40.2
3.0: 0.36.2-alt1
www.altlinux.org/Changes

Другие репозитории
Upstream:1.1.20

Группа :: Система/Серверы
Пакет: dbus

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: dbus-1.0.1-altify_init_script.patch
Скачать


diff -urN dbus-1.0.1.orig/bus/messagebus.in dbus-1.0.1/bus/messagebus.in
--- dbus-1.0.1.orig/bus/messagebus.in	2006-10-19 18:34:47 +0300
+++ dbus-1.0.1/bus/messagebus.in	2006-12-04 01:59:27 +0200
@@ -2,14 +2,18 @@
 #
 # messagebus:   The D-BUS systemwide message bus
 #
-# chkconfig: 345 97 03
+# chkconfig: 345 33 92
 # description:  This is a daemon which broadcasts notifications of system events \
 #               and other messages. See http://www.freedesktop.org/software/dbus/
 #
 # processname: dbus-daemon
+# config: /etc/dbus-1
 # pidfile: @DBUS_SYSTEM_PID_FILE@
 #
 
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
 # Sanity checks.
 [ -x @EXPANDED_BINDIR@/dbus-daemon ] || exit 0
 
@@ -20,33 +24,31 @@
 processname=dbus-daemon
 servicename=messagebus
 
+LOCKFILE=@EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
+PIDFILE=@DBUS_SYSTEM_PID_FILE@
+USER=messagebus
+
 RETVAL=0
 
 start() {
-    echo -n $"Starting system message bus: "
     if [ -x @EXPANDED_BINDIR@/dbus-uuidgen ] ; then
         @EXPANDED_BINDIR@/dbus-uuidgen --ensure
     fi
 
-    daemon --check $servicename $processname --system
+    msg_starting $"system message bus"
+    start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --no-announce -- \
+	"$processname" --system
     RETVAL=$?
-    echo
-    [ $RETVAL -eq 0 ] && touch @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
+    return $RETVAL
 }
 
 stop() {
-    echo -n $"Stopping system message bus: "
-
-    ## we don't want to kill all the per-user $processname, we want
-    ## to use the pid file *only*; because we use the fake nonexistent 
-    ## program name "$servicename" that should be safe-ish
-    killproc $servicename -TERM
+    msg_stopping $"system message bus"
+    stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --no-announce \
+       "$processname" -TERM
+    rm -f "$PIDFILE" ||:
     RETVAL=$?
-    echo
-    if [ $RETVAL -eq 0 ]; then
-        rm -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename
-        rm -f @DBUS_SYSTEM_PID_FILE@
-    fi
+    return $RETVAL
 }
 
 # See how we were called.
@@ -58,25 +60,30 @@
         stop
         ;;
     status)
-        status $processname
-        RETVAL=$?
+	status --pidfile "$PIDFILE" --expect-user "$USER" $processname
+	RETVAL=$?
         ;;
     restart)
         stop
         start
         ;;
+    condstop)
+	if [ -f "$LOCKFILE" ]; then
+	    stop
+	fi
+	;;
     condrestart)
-        if [ -f @EXPANDED_LOCALSTATEDIR@/lock/subsys/$servicename ]; then
+	if [ -f "$LOCKFILE" ]; then
             stop
             start
         fi
-        ;;
+	;;
     reload)
-        echo "Message bus can't reload its configuration, you have to restart it"
-        RETVAL=$?
+        msg_usage "Message bus can't reload its configuration, you have to restart it"
+        RETVAL=1
         ;;
     *)
-        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+        echo $"Usage: $0 {start|stop|status|restart|condstop|condrestart|reload}"
         ;;
 esac
 exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin