View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Search this Thread
Old 10-31-2008, 04:12 AM   #1
Registered: Nov 2003
Distribution: Debian SID
Posts: 649

Rep: Reputation: 31
Using debian start-stop-daemon on Centos

I'm trying to install LLink ( on Centos4 which makes use of the script below. I'm trying to get it running using these instructions


# Provides:          llink
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start llink daemon

# Defaults

LLINKOPTS="-f /usr/local/etc/llink/llink.conf -w /usr/local/etc/llink"

# clear conflicting settings from the environment
unset TMPDIR

# See if the daemons are there
test -x /usr/local/bin/llink || exit 0

. /lib/lsb/init-functions

case "$1" in
                log_daemon_msg "Starting llink daemons" "llink"

                if ! start-stop-daemon --start --quiet --exec $LLINK -- $LLINKOPTS ; then
                        log_end_msg 1
                        exit 1

                log_end_msg 0
                log_daemon_msg "Stopping llink daemons" "llink"

                start-stop-daemon --stop --quiet --oknodo --exec $LLINK -- $LLINKOPTS
                $0 stop
                sleep 1
                $0 start
                echo "Usage: /etc/init.d/llink {start|stop|reload|restart|force-reload}"
                exit 1

exit 0
And needed to install the Debian start-stop-daemon on my Centos4 box. These are the steps I took to get it running on Centos:

I downloaded this tar archive:
unpacked it
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/

gcc start-stop-daemon.c -o start-stop-daemon

Then I copied the newly created start-stop-daemon binary to /usr/sbin/

The result is hopefull, but I'm still getting some errors. I'd like to work out the last errors and get this thing to start up at boot (well, not sure if that's such a big point since the server is running 24/7 but it's good fun getting there).
These are the errors I'm still stuck with:

[root@gateway]# /etc/init.d/llink start
/etc/init.d/llink: line 30: log_daemon_msg: command not found
/usr/local/bin/llink - Jorgen Lundman v2.2.0 build 1305 (Mon Oct 27 12:30:29 2008) (libdvdnav).

[main] ready!
/etc/init.d/llink: line 33: -f: command not found
/etc/init.d/llink: line 38: log_end_msg: command not found
Shame that all this is so Debian while all my boxes run Debian except for the server (Centos). Any clues on how to get this fixed? Perhaps I should't use this script at all and go for a more Centos solution. Any comments on that are very welcome!

Old 11-02-2008, 05:59 AM   #2
Registered: May 2001
Posts: 27,451
Blog Entries: 54

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
Your SysV /etc/init.d/llink sources /lib/lsb/init-functions which may or may not exist (one doc, though Fedora: If you can't source functions like "log_daemon_msg" from elsewhere then at least you could add something like
log_daemon_msg() { logger "$@"; }
log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
and change $LLINKOPTS to read "${LLINKOPTS}", though in RHEL/CentOS you usually want to source a /etc/sysconfig/llink and put options there (cleaner, easier managable).


centos, debian

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
Unexpected error messages with start-stop-daemon markseger Debian 3 10-29-2008 08:14 PM
start-stop-daemon for linux eliufoo Linux - Software 1 02-07-2008 02:12 AM
Debian "Start-Stop-Daemon" Notwerk Linux - Software 3 12-19-2005 03:16 AM
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 07:33 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 @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration