pmud & services

Jason DeVita yellowdog-newbie@lists.terrasoftsolutions.com
Sun, 14 Sep 2003 09:30:47 -0400 (EDT)


On Sat, 13 Sep 2003, Michael Molino wrote:

> > > how do i get pmud to run as a service?
> >
> > Are you running Yellow Dog Linux on a PowerBook? If so, it was probably
> > installed by default. What do you see when you type "/sbin/pmud
> > --help"? I get a short help file that implies pmud is already running.
>
> That doesn't impy that it's running, that just implies the binary exists.  I
> am running YDL 3 on an iBook.  I have to manually run /sbin/pmud before
> putting my laptop to sleep.  Otherwise, if I type snooze I get a "can not
> connect" error message.  pmud used to start as a service - not sure why it
> changed.

I am no expert, but I think what I am about to say is correct.  If you
want to turn on a service during startup, you need to tell init to do it.
One way, is to enter the command you want to run (e.g. /sbin/pmud or maybe
preferably "/etc/init.d/pmud start") into the file "/etc/rc.d/rc.local".
This is the last script executed by init when entering runlevels 2 through
5.

The "real" way to do it, is to place a symbolic link into the appropriate
rc[0-6].d directory.  For example, if you want pmud to start up in
runlevel 3, type:

ln -s /etc/init.d/pmud /etc/rc3.d/S40pmud

where the "S" tells init to run "/etc/init.d/pmud start" (whereas "K"
would tell init to run "...pmud stop") and the "40" tells init when to run
it (all the scripts referred to in /etc/rc3.d are run in numerical order).

To get it to stop pmud nicely before shutting down, you could then enter
something like:

ln -s /etc/init.d/sshd /etc/rc0.d/K60pmud

Of course, if S*pmud is already in the appropriate rc*.d directory, and
pmud is not starting up, well, then that's a whole different problem...
Hope that helps.

-J