[Pm-utils] services

Stefan Seyfried seife at suse.de
Thu Apr 27 01:40:40 PDT 2006

On Thu, Apr 27, 2006 at 09:17:02AM +0100, Richard Hughes wrote:
> Currently in pm/functions:stopservice() we use:
> /sbin/service "$1" stop
> Which is very Redhat specific. How do we do the same thing (starting and
> stopping services) on Suse, Ubuntu, Debian etc?

We should just use the LSB standard which is (IIRC, i might be wrong)
/etc/init.d/$SERVICE {start|stop}

This won't work on slackware, where /etc/rc.d/$SERVICE works.

> We should just add a check for /etc/$distro$-release and use the right
> script IMO.

maybe only for those that do not follow LSB?
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen

More information about the Pm-utils mailing list