How do I restart IP aliases in rc.config?

From: George Livsey <george_at_Mach2.allbiz.com>
Date: Thu, 22 Aug 1996 11:39:55 -0500 (CDT)

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-----
Received on Thu Aug 22 1996 - 19:01:38 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT