LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-28-2008, 09:27 AM   #1
markseger
Member
 
Registered: Jul 2003
Posts: 241

Rep: Reputation: 25
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?

-mark

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

Rep: Reputation: 85
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
markseger
Member
 
Registered: Jul 2003
Posts: 241

Original Poster
Rep: Reputation: 25
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.

-mark
 
Old 10-29-2008, 08:14 PM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 226

Rep: Reputation: 43
Mark,

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.

Norm
 
  


Reply


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


All times are GMT -5. The time now is 12:14 PM.

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