[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to put ifconfig in startup script?



On Fri, 16 Aug 1996 23:31:49 PDT keng@hybrid.com wrote:

> Hello;
> 
> After messing up my XDM and essentially locking myself
> out of my system for a while, I have become interested
> in setting up my ethernet card from a startup script.
> 
> Does one put the ifconfig and route statements in the usual
> rc.inet1 and reference it somehow from rc6.d, or what?
> 
> I appreciate any suggestions here; the NET-2 HOWTO seems to be 
> geared toward the Slackware kind of system.

In a Debian system, these statements should go into /etc/init.d/network.
It contains a small script to be customized.
Here's a copy of mine:

#!/bin/sh
ifconfig lo localhost
route add -net localnet
IPADDR=207.104.147.129
NETMASK=255.255.255.248
NETWORK=207.104.147.128
BROADCAST=207.104.147.136
GATEWAY=none
INTERFACE=dummy0

[ $INTERFACE != none ] && \
    ifconfig $INTERFACE ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} &&\
    route add -net ${NETWORK}
[ $GATEWAY != none ] && route add default gw ${GATEWAY} metric 1

Note that I have no default gateway (diald sets up its own).

Phil.




Reply to: