startup scripts
I wanna have a small script to give the eth0 multiple address at startup like this:
-----------------------------------------------
#/bin/bash
ifconfig eth0 172.16.204.1
ifconfig eth0 172.16.204.2 alias netmask 255.255.255.0 (it will used to demostrate virtual hosts)
ifconfig eth0 172.16.205.1 alias (the different IP network)
----------------------------------------------------
so i put my scripts in a file called lan_startup.
Now where should I call this scripts?
1-in /etc/bashrc (global functions and aliases)
2-in /etc/profile (system environment and startup programs)
3-/etc/rc.d/rc.local (I know this is used to put specific commands that get executed every time
you boot the computer regardless of runlevel)
Another question: is it possible to put custom scripts in /etc/rc.d/init.d/ and creat a symlink from /etc/rc.d
/rc3.d/ to it or this is only used to put scripts in order to start and stop the
services(servers)like httpd?
Thank u very much in advance.
mimi
|