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

Re: Schemes



This should work, I guess.  It's a modification of my setup.  Then
call "cardctl scheme work" when at work, and "cardctl scheme dhcp"
when using a dhcp config.  Note the start_fn() and stop_fn(), for
fiddling with eth0.  When you reboot, the last used scheme comes up.

# /etc/pcmcia/network.opts
# Network adapter configuration
#
# Automatically generated during the Debian installation
#
# The address format is "scheme,socket,instance,hwaddr".
#
case "$ADDRESS" in
work,*,*,*)
	# Transceiver selection, for some cards -- see 'man ifport'
	IF_PORT=""
	# Use /sbin/pump for BOOTP/DHCP? [y/n]
	PUMP="n"
	# Host's IP address, netmask, network address, broadcast address
	IPADDR="192.71.13.221"
	NETMASK="255.255.255.0"
	NETWORK="192.71.13.0"
	BROADCAST="192.71.13.255"
	GATEWAY="192.71.13.10"
	DOMAIN="irf.se"
	DNS_1="192.71.13.66"
	start_fn() { ifdown eth0; }
	stop_fn() { ifup eth0; }
	;;
dhcp,*,*,*)
	# Transceiver selection, for some cards -- see 'man ifport'
	IF_PORT=""
	# Use /sbin/pump for BOOTP/DHCP? [y/n]
	PUMP="n"
	DHCP="y"
	start_fn() { ifdown eth0; }
	stop_fn() { ifup eth0; }
	;;
esac

/micce

-- 
Mikael Hedin, MSc                   +46 (0)980 79176
Swedish Institute of Space Physics  +46 (0)8 344979 (home)
Box 812, S-981 28 KIRUNA, Sweden    +46 (0)70 5891533 (mobile)
[gpg key fingerprint = 387F A8DB DC2A 50E3 FE26  30C4 5793 29D3 C01B 2A22]



Reply to: