/etc/init.d/kannel depends on nonexistant /var/run/kannel directory

Bug #187356 reported by Matt Wilson
2
Affects Status Importance Assigned to Milestone
kannel (Debian)
Fix Released
Unknown
kannel (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: kannel

The /etc/init.d/kannel script tries to put files inside /var/run/kannel. That directory doesn't exist and gets erased every time.

I suggest adding something sort of like this into the /etc/init.d/kannel script:

# Create the PIDFILES dir if it doesn't exist.
test ! -d $PIDFILES && mkdir $PIDFILES && chown kannel $PIDFILES

This is how I have fixed the problem on my boxes, anyway.

Related branches

Changed in kannel:
assignee: nobody → dcordero
status: New → In Progress
Revision history for this message
David Cordero (david.cordero) wrote :

I have 2 problems that i have no idea how to solve, one with linda with a .png image, that tell me:

W: kannel-docs; File /usr/share/doc/kannel-docs/alligata/licences.png is considered to be an extra license file.
 The file shown above is considered to be another license file, where
 as the license for a package should be contained in the copyright
 file, which should be installed into /usr/share/doc/<pkg>.

And the other with lintian:

E: kannel source: outdated-autotools-helper-file config.guess 2003-05-19
N:
N: The referenced file has a time stamp older than year 2004 and the
N: package does not build-depend on autotools-dev or automake and
N: therefore apparently does not update it. This usually means that the
N: source package will not work correctly on all currently released
N: architectures.
N:
E: kannel source: outdated-autotools-helper-file config.sub 2003-05-09

Changed in kannel:
status: Unknown → New
Revision history for this message
Matt Wilson (mw44118) wrote :

Hi David,

Do we need to fix your problems before we fix my problem?

By the way, I've been poking around to see how other init scripts deal with the fact that /var/run is flushed after every reboot.

This is how /etc/init.d/klogd makes sure that it has a subdirectory in /var/run:

case "$1" in
  start)
    log_begin_msg "Starting kernel log daemon..."
    # create klog-writeable pid and fifo directory
    mkdir -p /var/run/klogd
    chown klog:klog /var/run/klogd
    mkfifo -m 700 $kmsgpipe
    chown klog:klog $kmsgpipe

And this is how /etc/init.d/slony1 does it:

prepare_start() {
    mkdir -p /var/run/slony1 \
    && chown postgres:postgres /var/run/slony1/ \
    && chmod 2775 /var/run/slony1/
}

So, it does not look like a standard method exists. I would like to get some really good sysadmins to help us with this. There really should be a standard way to do this.

Matt

Revision history for this message
David Cordero (david.cordero) wrote :

I have solve the lintian error, with a new Build-Depend to autotools-dev. (thanks Luca)

About the linda's error, i think that linda show the warning message because take the license.png as a license file, although is only an image.

Matt i'm using the script that you wrote in the bug report, i`m adding this to /etc/init.d/kannel file:

# Create the PIDFILES dir if it doesn't exist.
test ! -d $PIDFILES && mkdir $PIDFILES && chown kannel $PIDFILES

if that ok, isn't it?

Revision history for this message
Matt Wilson (mw44118) wrote :

Yeah, I think my way will work fine. And if not, we'll hear about it quickly!

:)

Revision history for this message
David Cordero (david.cordero) wrote :

Building with pbuilder in a hardy, show a lot of warning like:

dpkg-shlibdeps: warning: debian/kannel-extras/usr/lib/kannel/test/test_smsc shouldn't be linked with libmysqlclient_r.so.15 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/kannel/usr/bin/wmlsc shouldn't be linked with libnsl.so.1 (it uses none of its symbols).
etc...

all of them are "it uses none of its symbols" messages.

I think that probably a gcc bad option that create a bad linker process.

Revision history for this message
David Cordero (david.cordero) wrote :

Complete log of warnings

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

* Add 10_create_pidfile in debian/patches/00list, otherwise your patch won't be applied
* Homepage field should be listed in Source stanza and removed elsewhere

Changed in kannel:
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kannel - 1.4.1-2ubuntu1

---------------
kannel (1.4.1-2ubuntu1) hardy; urgency=low

  [ David Cordero ]
  * Bump Standard-Versions to 3.7.3.
  * Don't ignore `make distclean' errors, test for Makefile presence instead.
  * Update deprecated ${Source-Version} substvar to {binary:Version} in
    /debian/control kannel-extras.
  * Modify Homepage entries on /debian/control to new standard.
  * Changed section from kannel-docs to doc on /debian/control.
  * Added Build-Depend to autotools-dev needed.
  * Modify Maintainer value to match the DebianMaintainerField spec.

  [ Luca Falavigna ]
  * debian/kannel.init: create /var/run/kannel directory if not present.
    Ubuntu mounts /var/run on tmpfs and it will be cleaned each reboot.
    This fix LP: #187356.
  * debian/control: build-depend on libssl-dev (>= 0.9.8).

 -- Luca Falavigna <email address hidden> Sat, 29 Mar 2008 11:01:47 +0100

Changed in kannel:
status: In Progress → Fix Released
Changed in kannel (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.