IP Aliases
Added by astuffedtiger on 2017-05-16 19:33:21
#!/sbin/runscript

depend() {
        need bootmisc
        after net
}

start() {
ebegin "Setting 69.54.26.116, 69.54.26.117, 69.54.26.118, 69.54.26.119, 69.54.26.121, 69.54.26.123, 69.54.26.124, 69.54.26.125 IP Aliases ..."

        #ifconfig eth0 up
        ifconfig eth0:0 69.54.26.116 netmask 255.255.255.248
        ifconfig eth0:1 69.54.26.117 netmask 255.255.255.248
        ifconfig eth0:2 69.54.26.118 netmask 255.255.255.248
        ifconfig eth0:3 69.54.26.119 netmask 255.255.255.248
	ifconfig eth0:4 69.54.26.121 netmask 255.255.255.248
	ifconfig eth0:5 69.54.26.123 netmask 255.255.255.248
	ifconfig eth0:6 69.54.26.124 netmask 255.255.255.248
	ifconfig eth0:7 69.54.26.125 netmask 255.255.255.248

eend $? "Failed to create"
}


stop() {
ebegin "Killing 69.54.26.116, 69.54.26.117, 69.54.26.118, 69.54.26.119, 69.54.26.121, 69.54.26.123, 69.54.26.124, 69.54.26.125 IP Aliases ..."

        # ifconfig eth0 down
        ifconfig eth1:0 down
        ifconfig eth1:1 down
        ifconfig eth1:2 down
        ifconfig eth1:3 down

eend $? "Failed to stop.. IP may be in use"
}


restart() {
ebegin "restarting eth0"
        svc_stop
        sleep 10
        svc_start
eend $? "Failed to restart"
}