Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Dec 2002
- Karachi, Pakistan
How to run commands in Startup using KDE at RH8
I have installed Red Hat Linux 8 with KDE. This station needs to access data from a NT4 Server using SAMBA. I have done all the SAMBA config work. I am using SMBMOUNT command for SAMBA on terminal. Now I want to autorun this command at startup.
Is there any thing like AUTOEXEC.BAT file in DOS/WINDOWS
- Join Date
- Oct 2001
- Täby, Sweden
There are several counterparts of autoexec.bat:
The first thing run by the kernel on boot is /sbin/init, which is the program that initializes everything else. It, in turn, looks at its configuration file /etc/inittab to decide what to do next. In the standard RH8 config, it executes /etc/rc.d/rc.sysinit, which initializes the system, ie. mounts local filesystem (networking is not yet turned on at this stage), loads sound modules, and so on. When rc.sysinit has finished, it enters one of seven runlevels (0 through 6). Usually this is 3 (for text mode) or 5 (for graphical mode). It looks in the directory named /etc/rc.d/rc<r>.d, where <r> is the runlevel to enter. It then first runs all the executables in there named K* with the argument "stop", and then all named S* with the argument "start", for is for Killing and Starting different subsystems, such as networking, sendmail, etc. These files are normally symlinks to the scripts in /etc/rc.d/init.d. You can also (as root, naturally) run these scripts manually to start and stop different subsystems, with the convenience script "service", as in "service sendmail stop" to shut down sendmail. Check out /etc/rc.d/init.d to see what scripts there are.
At the end of each runlevel, /etc/rc.d/rc.local is normally run, so that's one place to add things on your own if you don't want to write a service script for /etc/rc.d/init.d. However, since you want to mount a file system, I suggest that you take a look at /etc/fstab. Local filesystems in there are mounted by rc.sysinit, and network file systems are mounted by the service netfs when networking is up. What you want to add is a line looking something like this:
//server/share /mnt/smb smbfs defaults 0 0