Package: mumble-server
Version: 1.1.4-4+lenny1
Severity: normal
Tags: patch

When trying to get murmur-user-wrapper to do its job, I ran into 3
issues:
1. it requires dbus-x11, which is only recommended: by dbus, not by
   mumble-server itself.
2. it exits successfully on errors.
3. it can't start dbus if you use the -d option to move the config
   directory from its default ~/murmur

#3 is the main issue, obviously, but while I was at it, I fixed #2 too.
I'm not sure about policy wrt recursive recommends, so #1 may be my own
fault for unsetting Recommends-Important, and I left that alone.

recipe for reproduction (somewhat synthetic, sorry if i messed up c&p):
| $ murmur-user-wrapper -i
| Making /home/jani/murmur
| Creating /home/jani/murmur/murmur.ini
| Initialization done. Please edit /home/jani/murmur/murmur.ini
| $ murmur-user-wrapper
| Launching D-Bus session
| /usr/bin/murmur-user-wrapper: line 105: dbus-launch: command not found
| Failed to launch session DBUS, bailing out.
| $ echo $?
| 0
| $ sudo aptitude install dbus-x11
| [...]
| $ murmur-user-wrapper
| Starting Murmur
| $ murmur-user-wrapper -k
| Termination signal sent
| $ rm -r murmur
| $ killall dbus-daemon
| dbus-daemon(2658): Operation not permitted
| $ murmur-user-wrapper -d ~/.murmur -i
| Making /home/jani/.murmur
| Creating /home/jani/.murmur/murmur.ini
| Initialization done. Please edit /home/jani/.murmur/murmur.ini
| $ murmur-user-wrapper -d ~/.murmur
| Launching D-Bus session
| /usr/bin/murmur-user-wrapper: line 105: /home/jani/murmur/.dbus.sh: No such 
file or directory
| /usr/bin/murmur-user-wrapper: line 106: /home/jani/murmur/.dbus.sh: No such 
file or directory
| Failed to launch session DBUS, bailing out.
| $ echo $?
| 0

HTH,
    Jan

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (990, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages mumble-server depends on:
ii  adduser                      3.110       add and remove users and groups
ii  dbus                         1.2.1-5     simple interprocess messaging syst
ii  debconf [debconf-2.0]        1.5.24      Debian configuration management sy
ii  libc6                        2.7-18      GNU C Library: Shared libraries
ii  libgcc1                      1:4.3.2-1.1 GCC support library
ii  libqt4-dbus                  4.4.3-1     Qt 4 D-Bus module
ii  libqt4-network               4.4.3-1     Qt 4 network module
ii  libqt4-sql                   4.4.3-1     Qt 4 SQL module
ii  libqt4-sql-sqlite            4.4.3-1     Qt 4 SQLite 3 database driver
ii  libqt4-xml                   4.4.3-1     Qt 4 XML module
ii  libqtcore4                   4.4.3-1     Qt 4 core module
ii  libssl0.9.8                  0.9.8g-15   SSL shared libraries
ii  libstdc++6                   4.3.2-1.1   The GNU Standard C++ Library v3

Versions of packages mumble-server recommends:
pn  mumble-server-web             <none>     (no description available)

Versions of packages mumble-server suggests:
ii  mumble                    1.1.4-4+lenny1 Low latency VoIP client

-- debconf information excluded

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
--- /usr/bin/murmur-user-wrapper	2008-05-10 14:46:40.000000000 +0200
+++ murmur-user-wrapper	2009-01-26 17:26:36.000000000 +0100
@@ -1,13 +1,12 @@
 #! /bin/bash
 
 DIR=$HOME/murmur
-DBUSFILE=$DIR/.dbus.sh
 SYSDIR=/usr/share/doc/mumble-server/examples
 
 if [ $UID == 0 ] || [ $EUID == 0 ]; then
   echo "You should never run this script as root. If you want a system-wide install, see "
   echo "the documentation included with this package."
-  exit
+  exit 2
 fi
 
 unset SETPW
@@ -33,18 +32,20 @@
   		DO_KILL=1
   		;;
   	*)
-  		exit
+  		exit 2
   		;;
   esac
 done
+DBUSFILE=$DIR/.dbus.sh
 
 if [ $DO_KILL == 1 ]; then
 	if pkill -U $UID -u $EUID -o -x -f "/usr/sbin/murmurd -ini $DIR/murmur.ini"; then
 		echo "Termination signal sent"
 	else
 		echo "Murmur process not found; not terminated"
+        exit 2
 	fi
-	exit
+	exit 0
 fi
 
 if [ ! -d $DIR ]; then
@@ -52,7 +53,7 @@
   mkdir -m 0700 $DIR
 fi
 
-cd $DIR
+cd $DIR || exit 2
 
 if [ ! -f $DIR/murmur.ini ]; then
   echo "Creating $DIR/murmur.ini"
@@ -62,22 +63,22 @@
     gzip -cd $SYSDIR/murmur.ini.gz > $DIR/murmur.ini
   else
     echo "Could not find template for murmur.ini in $SYSDIR."
-    exit
+    exit 2
   fi
 elif [ $DO_INITONLY == 1 ]; then
   echo "$DIR/murmur.ini already exists, initialization failed."
-  exit
+  exit 2
 fi
 
 if [ $DO_INITONLY == 1 ]; then
   echo "Initialization done. Please edit $DIR/murmur.ini"
-  exit
+  exit 0
 fi
 
 if [ "X$SETPW" != "X" ]; then
 	echo "Setting superuser password to \"$SETPW\""
 	/usr/sbin/murmurd -ini $DIR/murmur.ini -supw $SETPW
-	exit
+	exit 0
 fi
 
 PID=$(pgrep -U $UID -u $EUID -o -x -f "/usr/sbin/murmurd -ini $DIR/murmur.ini")
@@ -94,7 +95,7 @@
 
 if [ "X$PID" != "X" ]; then
   echo "Murmur is already running."
-  exit
+  exit 1
 fi
 
 DBUS_SESSION_BUS_ADDRESS=invalid:/
@@ -106,9 +107,9 @@
   . $DBUSFILE
   if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / org.freedesktop.DBus.GetId 2> /dev/null > /dev/null; then
     echo "Failed to launch session DBUS, bailing out."
-    exit
+    exit 2
   fi
 fi
 
 echo "Starting Murmur"
-/usr/sbin/murmurd -ini $DIR/murmur.ini
+exec /usr/sbin/murmurd -ini $DIR/murmur.ini

Reply via email to