aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chapter9/network.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/chapter9/network.sh b/chapter9/network.sh
new file mode 100644
index 0000000..6eeead9
--- /dev/null
+++ b/chapter9/network.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+pushd /etc/sysconfig/ >/dev/null || exit 1
+cat > ifconfig.eth0 << "EOF"
+ONBOOT=yes
+IFACE=eth0
+SERVICE=ipv4-static
+IP=192.168.1.196
+GATEWAY=192.168.1.1
+PREFIX=24
+BROADCAST=192.168.1.255
+EOF
+popd >/dev/null || exit 1