lmegliol n00b

Joined: 12 Sep 2005 Posts: 68
|
Posted: Thu Dec 27, 2007 5:30 pm Post subject: Help with /etc/conf.d/net syntax... |
|
|
I am working on setting up Linux Virtual Server with a single director and two real servers. I have gotten it working by piecing together instructions from a few different sources. Part of the instructions is to run the following commands on the real servers:
Code: |
# ifconfig lo:1 192.168.2.9 broadcast 192.168.2.9 netmask 0xffffffff up
# route add -host 192.168.2.9 dev lo:1
|
Running these commands on the command line works great, but when I reboot, the configuration is obviously not saved. So I need a way to issue these commands from /etc/conf.d/net. But I cannot figure out the correct syntax in the file.
Any documentation I have found does not seem to cover such advanced configurations. I have tried several variations on the following:
Code: |
alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 dev lo:1")
|
or
Code: |
alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("-host 192.168.2.9 dev lo:1")
|
or
Code: |
alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 via lo:1")
|
or
Code: |
alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 via 192.168.2.9")
|
I just starting guessing by the end. In any case, I only varied the second command because I couldn't think of any other way to run the first command. Neither of the commands seemed to work, because on restarting the system or the network, neither of the configurations were set properly.
I suppose I could run the original commands in a startup script, but for the sake of clarity and keeping my configuration commands together, I'd like to keep it all in /etc/conf.d/net.
So, does anyone know the syntax of this file well enough to give me a hand with this configuration?
Thanks in advance. |
|