quick way to run a command on boot (mandrake 9)

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
Can someone give me a quick answer to how I can run a specific command on boot.

Specifically I want to mount a windows share using smbmount...

ex:
$ smbmount //server/share /local/localFolder -o username=XXX password=XXX
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
maybe I should mention that I need to run the command as root, and it should only be run once every boot.

I thought about CRON, but it seems to be more suited for "per user" tasks and tasks on a schedule...

What I need is probably more like a script that loads on boot... is this something that I could put in my modules.conf file?
or is there another .conf file for this sort of thing?
 

James

Storage is cool
Joined
Jan 24, 2002
Messages
844
Location
Sydney, Australia
/etc/rc.d is the place to look, mate. You can write a little executable #/bin/sh script in there and it will get run on boot.

I don't know the format of Linux's rc.d (or rc.sysinit or whatever) or else I'd help further. But a bit of searching around should make it clear.
 
Top