-
-
Save wenjianhn/7516c3099bbca6a1f689 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
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$1 | |
DEVICE=$1 | |
BOOTPROTO=static | |
NETMASK=255.255.255.0 | |
IPADDR=$2 | |
ONBOOT=yes | |
EOF |
requires wget with Server Name Indication support (bz #909604)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http_proxy=http://hk.wenjian.me:3128 https_proxy=http://hk.wenjian.me:3128 wget -O set_static_ip.sh http://goo.gl/4iUsVY
chmod u+x set_static_ip.sh