Package: smstools
Version: 3.1.3-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch



Hi,

A Ubuntu user noticed[0] that the /var/run/smstools directory wasn't
being recreated after a reboot and produced a patch to the init file
to remedy this. I've attached it for your consideration. Please consider
applying it in your next upload.

Thanks for your time,
Iain

[0] https://bugs.launchpad.net/ubuntu/+source/smstools/+bug/221973

-- System Information:
Debian Release: lenny/sid
  APT prefers intrepid-updates
  APT policy: (500, 'intrepid-updates'), (500, 'intrepid-security'), (500, 
'intrepid-proposed'), (500, 'intrepid-backports'), (500, 'intrepid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27-7-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u smstools-3.1.3/debian/changelog smstools-3.1.3/debian/changelog
diff -u smstools-3.1.3/debian/init.d smstools-3.1.3/debian/init.d
--- smstools-3.1.3/debian/init.d
+++ smstools-3.1.3/debian/init.d
@@ -47,6 +47,21 @@
                # Delete lock files if they exist
                find /var/spool/sms -name '*.LOCK' -exec rm \{\} \;
        fi
+       
+       #make sure we have the directories and access where needed
+       if [ ! -d $(dirname $PIDFILE) ]; then
+               install -d -o $USER -g $GROUP -m 755 $(dirname $PIDFILE)        
        
+       else
+               chown -R $USER:$GROUP $(dirname $PIDFILE)
+       fi
+       
+       if [ ! -d $(dirname $INFOFILE) ]; then
+               install -d -o $USER -g $GROUP -m 755 $(dirname $INFOFILE)       
        
+       else
+               chown -R $USER:$GROUP $(dirname $INFOFILE)
+       fi
+
+       
 
        # Start the daemon
        ARGS="-p$PIDFILE -i$INFOFILE -u$USER -g$GROUP"

Reply via email to