Package: mldonkey
Followup-For: Bug #354701

I prepared a patch for the ubuntu, which fixes this bug. I hope it
doesn't break too much, but I don't see currently another way than
extending /etc/default/mldonkey, which causes a new conffile prompt.

Could you please give me feedback what you think about this, before I
upload this?

Gruesse,
        Reinhard



-- System Information:
Debian Release: testing/unstable
  APT prefers dapper
  APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-19-686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
diff -u mldonkey-2.7.3/debian/mldonkey-server.postinst 
mldonkey-2.7.3/debian/mldonkey-server.postinst
--- mldonkey-2.7.3/debian/mldonkey-server.postinst
+++ mldonkey-2.7.3/debian/mldonkey-server.postinst
@@ -237,7 +237,6 @@
 
       for file in \
         "$new_mldonkey_dir"  \
-        "/var/run/mldonkey" \
         "/var/log/mldonkey" \
         "$new_mldonkey_dir/downloads.ini" \
         "$new_mldonkey_dir/downloads.ini.dpkg" \
@@ -293,6 +292,7 @@
 # This file is managed using ucf(1)
 
 MLDONKEY_DIR=$new_mldonkey_dir
+MLDONKEY_USER=$run_as_user
 MLDONKEY_GROUP=$mldonkey_group
 MLDONKEY_UMASK=$mldonkey_umask
 MAX_ALIVE=$max_alive
diff -u mldonkey-2.7.3/debian/mldonkey-server.init 
mldonkey-2.7.3/debian/mldonkey-server.init
--- mldonkey-2.7.3/debian/mldonkey-server.init
+++ mldonkey-2.7.3/debian/mldonkey-server.init
@@ -26,6 +26,17 @@
 
 . $CONFIG
 
+if [ x"$MLDONKEY_USER" = x -o x"$MLDONKEY_GROUP" = x ]; then
+       echo Please set both variables "MLDONKEY_USER" and "MLDONKEY_GROUP" in 
/etc/default/mldonkey-server
+       exit 1
+fi
+
+# /var/run is on tempfs now!
+if [ ! -d /var/run/mldonkey ]; then
+       mkdir -m 755 /var/run/mldonkey
+fi
+chown $MLDONKEY_USER:$MLDONKEY_GROUP /var/run/mldonkey
+
 WRAPPER_OPTIONS=""
 
 # Set the pidfile
diff -u mldonkey-2.7.3/debian/changelog mldonkey-2.7.3/debian/changelog
--- mldonkey-2.7.3/debian/changelog
+++ mldonkey-2.7.3/debian/changelog
@@ -1,3 +1,12 @@
+mldonkey (2.7.3-2ubuntu1) dapper; urgency=low
+
+  * introduce new config variable in /etc/default/mldonkey-server:
+    MLDONKEY_USER. This variable is only used by the init script
+  * make the initscript create /var/run/mldonkey-server, setting correct owner
+    and permissions.
+
+ -- Reinhard Tartler <[EMAIL PROTECTED]>  Tue, 28 Feb 2006 12:41:52 +0100
+
 mldonkey (2.7.3-2) unstable; urgency=low
 
   * Fix the build on alpha by using a workaround when opt compilation

Reply via email to