Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@wenjianhn
Forked from tumf/gist:1354282
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wenjianhn/7516c3099bbca6a1f689 to your computer and use it in GitHub Desktop.
Save wenjianhn/7516c3099bbca6a1f689 to your computer and use it in GitHub Desktop.
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$1
DEVICE=$1
BOOTPROTO=static
NETMASK=255.255.255.0
IPADDR=$2
ONBOOT=yes
EOF
@wenjianhn
Copy link
Author

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

@wenjianhn
Copy link
Author

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