Jump to content

"start-stop" daemons


Recommended Posts

The author of btnx, a great program that lets one map keyboard keystroke combinations or applications to the mouse buttons on more exotic mice (i.e. Logitech MX Revolution) wrote the program for Ubuntu. His execution script doesn't quite work for Mandriva (2008.0). The forum thread is here: http://ubuntuforums.org/showthread.php?t=455656 The home page for btnx is here: http://ollisalonen.com/btnx/

 

When I indicated that it didn't work right in Mandriva, he responded as follows:

 

"The service script in /etc/init.d/btnx is made from a Debian skeleton script. It apparently makes calls that are Debian (or Debian-based distros, ie Ubuntu) specific.

 

I will have to change this to make it compatible with other distros. Mandriva has start-stop-daemon, right?"

 

I'm not really sure what he is asking. How should I respond to him?

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

"The service script in /etc/init.d/btnx is made from a Debian skeleton script. It apparently makes calls that are Debian (or Debian-based distros, ie Ubuntu) specific.

 

I will have to change this to make it compatible with other distros. Mandriva has start-stop-daemon, right?"

 

I'm not really sure what he is asking. How should I respond to him?

As root, you can handle many services (sort of "frontends" for daemons) in Mandriva this way:

 

"service <servicename> start | stop | restart | status"

 

Guess this is what he meant, as you can access services also by entering their pathname, which would be /etc/init.d/<servicename>. So in short: the answer is yes (but no guarantee that it will work). Probably the author of btnx will find some Mandriva examples useful (like alsa, haldaemon, cups...) from /etc/init.d/.

Link to comment
Share on other sites

It also has chkconfig to add the service so that it will appear on a list that is configurable and can be enabled/disabled during bootup where necessary.

Link to comment
Share on other sites

The correct way to handle starting and stopping services on Mandriva is with the 'service' command. To enable and disable services at boot, it's the 'chkconfig' command.

 

start-stop-daemon is a Debianism. If the author wants to make his initscript properly distribution-independent, he should follow the LSB:

 

http://refspecs.linux-foundation.org/LSB_3...tocsysinit.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...