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

Re: startup & shutdown



Fredrik Appelberg wrote:
> 

[Disclaimer in advance: I'm not an expert on any of this, but I have
come up against the same issues; all my answers are only from memory, so
read the docs on my suggestions before blindly following them]

> Allright, now I finally got my sb live soundcard working (debian
> kernel-image installs take all the pain out of kernel-upgrading) I
> thought it would be cool if I could get it to autoload when booting,
> so that I won't have to do su & modprobe manually every time. So
> started looking for rc.local (yes, I am an ex-redhatter), then
> remembered that debian uses a different startup routine. After having
> read the dox on sysvinit I'm still stumped though. Where do I put
> stuff that I want executed once and exactly once on boot? rc.boot
> seems like good candidate, but I don't want to mess with startup stuff
> that I don't know anything about.

For loading a module, you don't need to do anything with /etc/init.d.
There is a file called /etc/modules which lists the modules you want to
load at boot time, and then some files in /etc/modutils/ which let you
specify the parameters. I believe that the one that contains the command
line options is /etc/modutils/modconf.

The /etc/init.d mechanism is intended for daemons that are to be started
and stopped. To add something to that you would need to create a script
that could recognize whether it was called with "start" or "stop" as its
argument, and start or stop the service as appropriate. I believe there
is even a template for this in /etc/init.d somewhere, although I forget
where. As I said though, you don't need init.d for loading modules.

> Then for my next question: my motherboard have some fancy
> power-management features. Is it possible to turn the power off with a
> command (kinda like win95 does when shutting down)? When I do 'halt' I
> still have turn the power off manually. This is no big deal, but it
> would be nice.

I'm afraid you'll need to recompile your kernel for this, and answer yes
to "APM support" and "Power off on shutdown". From your post it sounds
like you haven't compiled a kernel under debian before... if this is
true, I recommend installing the kernel-package package which pretty
much automates the whole process. Read the docs and enjoy :) [Btw, if
you are running potato, there was a bug recently which required you to
manually change the /vmlinuz symlink. I don't know if this has been
fixed or not, but it's not hard to do manually anyway]

HTH,
Stuart.


Reply to: