-----Message d'origine----- De : Christoph Lehmann [mailto:christoph.lehmann@gmx.ch] Envoye : lundi 28 juin 2004 21:54 A : suse-linux-e@suse.com Objet : [SLE] one network-card with 2 different configurations
Hi
In my office I need to define a fix IP address for the network-card, but at home everythink works with DHCP.
since I don't feel like everytime I change to the office or come home to newly define the network card with yast:
Is there a possibility to define one and the same network-card with two different 'profiles' so that I just need to switch the profile ( I think this exists for mac's ...)
many thanks for your kind help
I am sure, there must be many users, facing the same problem
cheers
christoph
I've met the same problem with my nvidia card, I wanted to boot either with TVout support or not. Isolved it by defining an environment variable at boot, according to the value I choose by a symbolic link between two different XF86Config files. In your case you can define either the "office=" or the "home=' as boot parameter and in one case link to a ifcfg-eth-id-xxxxxx file and in the other case to another file. You define an init script in /etc/init.d which is run before starting network and it'll work. As example you'll find below the script I wrote for xfree. Ready to explain more and to help you. Michel ------------------------- #!/bin/sh # # /etc/init.d/xfree # # and symbolic its link # # /usr/sbin/rcxfree # # This script manages the graphic card configuration # # Basic support for the Linux Standard Base Specification 1.0.0 (to be used by # insserv for exemple) ### BEGIN INIT INFO # Provides: TVout # Required-Start: $network # Required-Stop: # Default-Start: 5 # Default-Stop: # Description: Manages the graphic card configuration ### END INIT INFO # . /etc/rc.status # See how we were called. case "$1" in start) rc_reset rm /etc/X11/XF86Config if env | grep '^vga=' > /dev/null ; then { echo -n "Disabling TV out" ln -s /etc/X11/XF86Config_notv /etc/X11/XF86Config } else { echo -n "Enabling TV out" ln -s /etc/X11/XF86Config_tvout /etc/X11/XF86Config } fi rc_status -v ;; stop) ;; *) echo "Usage: $0 {start|stop}" exit 1 esac --------------------------------------------------------
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com