[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: initscripts

On Mon, 28 Jul 2003 10:38:14 +0200
Peter Hugosson-Miller <pehu@im.se> wrote:
> Still no responses to my apm question ( 
> http://lists.debian.org/debian-user/2003/debian-user-200307/msg03355.html
> ), so I've started investigating a bit, to see if I can figure this
> out for myself.
> I have found the following page that describes, amoung other things,
> the initscripts that are run when changing runlevels: 
> http://www.debian.org/doc/debian-policy/ch-opersys.html and I think I
> am in the right area. Trouble is, this seems to be more aimed at
> package maintainers, so that packages that add initscripts do so in
> "the right way" for debian.
> Still, what I have come up with is the following:
> 1) I need to write a script that when it receives the argument "stop" 
> will do a "modprobe apm power_off=1".
> 2) The script needs to live in /etc/rc0.d, or somewhere else but be 
> symlinked there.
> 3) The script needs to be called Sxxloadapm, where xx is a suitably
> high number so that gdm has already been stopped (I chose this, as in
> rc0.d, "S" scripts are still run after "K" ones, but with the
> parameter "stop", so it seems safer).
> I'm afraid that's as good as I can do by myself, so would anyone be so
> kind as to do the final polishing for me (that includes suggestions as
> to the script itself - I've never written one of these before, and I 
> find the existing ones hard to follow).
> I would also like to make sure that this is done in the nicest way,
> i.e. not too hacky. The whole thing is a bit of a hack, I know, but I
> can't see any other way to make this work.
> Thanks in advance.

I can't really help, but if apm is causing you problems, and you have a
fairly new motherboard, you might wanna check out if it supports acpi. I
switched to acpi resently and it works like a charm (much better than
apm ever did).


Only two things are infinite: human stupidity and the universe, and I'm
not sure about the latter. -- Albert Einstein

Reply to: