tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* How do I restart IP aliases in rc.config?
@ 1996-08-22 13:21 Craig Rodrigues
  0 siblings, 0 replies; 2+ messages in thread
From: Craig Rodrigues @ 1996-08-22 13:21 UTC (permalink / raw)
  To: tru64-unix-managers

Hello,

In /etc/rc.config, there are a few variables set aside for ifconfig:

IFCONFIG_0="207.81.40.2 netmask 255.255.255.0"
IFCONFIG_1=
IFCONFIG_2=
IFCONFIG_3=
IFCONFIG_4=
IFCONFIG_5=
IFCONFIG_6=
IFCONFIG_7=

Now, if I try to add the alias flag to IFCONFIG_0, when I reboot my machine,
it will not alias that IP.

Since I have about 10 IP aliases, this is a bit of a pain.  Does anybody
know how to modify these variables so that my aliases will be configured
properly on reboot?
Thanks.
-- 
Craig Rodrigues                     CyberPlex Interactive Media
Application Programmer              24 Duncan St., Suite 300
                                    Toronto ON  M5V 2B8   CANADA
craig@cyberplex.com                 (416) 597-8889(voice) (416)597-2345(fax)

^ permalink raw reply	[flat|nested] 2+ messages in thread
* How do I restart IP aliases in rc.config?
@ 1996-08-22 16:39 George Livsey
  0 siblings, 0 replies; 2+ messages in thread
From: George Livsey @ 1996-08-22 16:39 UTC (permalink / raw)
  To: tru64-unix-managers



I had the same problem with virtual domains so I did the following:

	1. Created a script called /sbin/init.d/vdomains:

		FAILFLAG=0
	if [ -f /etc/vdomains.config ] ; then
	     /etc/vdomains.config
	else
        echo "$0 ERROR: /etc/vdomains.config defaults file MISSING"
        exit 1
	fi

	2. Made a symbolic link from /sbin/vdomains to /sbin/rc3.d/S03vdomains
           Your's may be some other number... I simply numbered it S03 so 
           that it would execute after inet.

	3. Wrote the script /etc/vdomains.config and made it executable.
           Here's that script:

		ifconfig tu0 alias 205.219.8.50 # Captain Harry's
		ifconfig tu0 alias 205.219.8.51 # Wildlife Research Center
		ifconfig tu0 alias 205.219.8.52 # SportTrader.Com 


This may not be elegant, but it was quick and dirty.  Now all I need to do
to add a virtual domain is edit the /etc/vdomains.config script, shutdown 
and reboot.  You could, of course, do better by writing a script that would
send a HUP to all dependent daemons and so reload without a shutdown.  It 
would need to remove any changed ifconfigs and add the new ones.  If 
anyone has the time to write such a script.  I'd like to see a copy myself.

      -------
    /
   /  _  __     _____   _____   ____    ___   _____
  /       /    /____/  /    /  /   /  /___/  /____/
 /       /    /____   /____/  /          /  /____
 -------                             ___/  


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAy69xcMAAAEEAMRyOQiqogbZlOfsFBbee+aLHQ6KYFTfYvyAxvhI4dKQZAD6
3Pz4PEo+5Rl/GKjSXaDO90NN2bQIxdqpVgdtm3DATRbprEw4YkDqozQtEdlNM9kB
CRcQIvK7COEh29bPOBITxjumL/JmSysiZaVp1THEvHbsBexG6+n/GGI20p2JAAUR
tC9HZW9yZ2UgTC4gTGl2c2V5IDxnZW9yZ2VsQHN0YXJiYXNlLm5lb3NvZnQuY29t
Pg==
=m8x9
-----END PGP PUBLIC KEY BLOCK-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-08-22 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-22 13:21 How do I restart IP aliases in rc.config? Craig Rodrigues
  -- strict thread matches above, loose matches on Subject: below --
1996-08-22 16:39 George Livsey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox