Created
March 11, 2014 11:41
-
-
Save kongou-ae/9484098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more /etc/dhcp/dhclient-exit-hooks | |
#!/bin/bash | |
FIRST=`/sbin/ifconfig eth0|grep -i global|cut -d ":" -f2,3,4,5` | |
SECOND=`/sbin/ifconfig eth0|grep -i global|cut -d ":" -f6,7,8,9|cut -d "/" -f1` | |
IPV6=$FIRST:a$SECOND | |
for SUFFIX in `echo {0..9}`;do ifconfig eth0 inet6 add $IPV6$SUFFIX/64 > /dev/null 2>&1; done; | |
for SUFFIX in `echo {a..f}`;do ifconfig eth0 inet6 add $IPV6$SUFFIX/64 > /dev/null 2>&1; done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment