summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2002-03-09 10:07:16 +0000
committerJudd Vinet <judd@archlinux.org>2002-03-09 10:07:16 +0000
commit325b46a6b02aee695658eafe6b714d0e02810e1a (patch)
tree4c5fb1bdc143d937cb92e50a5fd768874105afed
parent897380f9b8071b8df0dcdb85cc9e1424640762b9 (diff)
Added some rudimentary networking stuff
-rw-r--r--rc.conf5
-rwxr-xr-xrc.multi7
-rwxr-xr-xrc.shutdown4
3 files changed, 15 insertions, 1 deletions
diff --git a/rc.conf b/rc.conf
index 38c6e01..389e0cd 100644
--- a/rc.conf
+++ b/rc.conf
@@ -11,7 +11,10 @@ TIMEZONE=Canada/Pacific
#
# Networking
#
-HOSTNAME=myhost
+HOSTNAME="myhost"
+IPADDR="192.168.0.2"
+NETMASK="255.255.255.0"
+GATEWAY="192.168.0.1"
#
# Daemons to start at boot-up
diff --git a/rc.multi b/rc.multi
index c3c48d8..0e8629f 100755
--- a/rc.multi
+++ b/rc.multi
@@ -12,6 +12,13 @@ if [ "$PCMCIA" = "yes" -a -f /etc/rc.d/pcmcia ]; then
fi
stat_busy "Starting Network"
+/sbin/ifconfig lo 127.0.0.1 netmask 255.255.255.255
+if [ "$IPADDR" != "" -a "$NETMASK" != "" ]; then
+ /sbin/ifconfig eth0 $IPADDR netmask $NETMASK
+ if [ "$GATEWAY" != "" ]; then
+ /sbin/route add default gw $GATEWAY
+ fi
+fi
stat_done
# Start daemons
diff --git a/rc.shutdown b/rc.shutdown
index 01f12d2..b9f8296 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -22,6 +22,10 @@ if [ "$PREVLEVEL" = "2" ]; then
# Shutdown network
stat_busy "Shutting Down Network"
+ /sbin/ifconfig lo down
+ if [ "$IPADDR" != "" -a "$NETMASK" != "" ]; then
+ /sbin/ifconfig eth0 down
+ fi
stat_done
# Shutdown pcmcia