Created
November 10, 2011 06:42
-
-
Save tumf/1354282 to your computer and use it in GitHub Desktop.
static ip 設定用シェルスクリプト
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
# ./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