Skip to content

Instantly share code, notes, and snippets.

@tumf
Created November 10, 2011 06:42
Show Gist options
  • Save tumf/1354282 to your computer and use it in GitHub Desktop.
Save tumf/1354282 to your computer and use it in GitHub Desktop.
static ip 設定用シェルスクリプト
# ./vif eth1 10.10.1.1
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$1
DEVICE=$1
BOOTPROTO=static
NETMASK=255.255.255.0
IPADDR=$2
ONBOOT=yes
EOF
cat /etc/sysconfig/network-scripts/ifcfg-$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment