Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 10-28-2008, 09:27 AM   #1
Registered: Jul 2003
Posts: 242

Rep: Reputation: 26
Unexpected error messages with start-stop-daemon

I have a start script that uses start-stop-daemon to run a perl script. Works find when executed manually but when I run it in a script I get:

Starting collectl: collectlsh: /bin/rpm: No such file or directory
sh: -c: line 0: syntax error near unexpected token `|'
sh: -c: line 0: `|head -n1'

The actual command being executed in the script is:
start-stop-daemon --quiet --start --exec $COLLECTL -- -D
where $COLLECTL is set to /opt/hp/collectl/sbin/collectl

the funny thing is my daemon DOES start! I can't find any references to rpm in the start-stop-daemon man page and since this command is binary, I can't see what it's doing.

rpm IS on the system only its in /usr/bin/rpm instead of /bin/rpm and I want my script to be flexible enough to run on differently configured systems

any idea what's going on and whether or not this is a bug or a feature of start-stop-daemon?


Last edited by markseger; 10-28-2008 at 09:33 AM.
Old 10-28-2008, 10:39 AM   #2
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
My guess would be that the $PATH environment variable may not be set properly in the shell the script launches, and start-stop-daemon can't handle this. You could try adding an export PATH= line to the script.
Old 10-28-2008, 10:45 AM   #3
Registered: Jul 2003
Posts: 242

Original Poster
Rep: Reputation: 26
I tried exporting the path and that didn't help. Since the message explicitly says /bin/rpm, I wouldn't have thought that would work. Meanwhile I found if I defined a softlink to /usr/bin/rpm it works, but that's an extra hack I'd rather not have to do.

Is /usr/bin/rpm a non-standard location for rpm on a debian system? Or more importantly is /bin/rpm a required path to rpm on debian? Feels like it may be for start-stop-daemon which would be unfortunate.

Old 10-29-2008, 08:14 PM   #4
Registered: Feb 2006
Distribution: Debian Sid
Posts: 675

Rep: Reputation: 255Reputation: 255Reputation: 255

I downloaded your package from sourceforge ( collectl-3.1.0-8.noarch.rpm ), converted it to a deb file using alien, and installed it using dpkg.

It starts fine from the command line and running your script collectl-debian on my system.

I'll remove the deb package and try installing it as an rpm package and see if that produces the error. It will be tomorrow evening before I can do that though.

Nice program. Produces lots of interesting data.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
start-stop-daemon for linux eliufoo Linux - Software 1 02-07-2008 02:12 AM
start-stop-daemon: user `man' not found cccc Debian 4 03-06-2007 04:03 AM
fake start-stop-daemon, messed up install tripmix Linux - Software 2 02-23-2007 11:11 PM
start-stop-daemon problems after process crash emarti20 Linux - Software 3 04-15-2005 08:54 AM
Logging with Start stop daemon bigsness Linux - General 0 01-19-2005 03:25 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration