netenv-0.94.3/config_netenv0100700000175000017500000000355007740324305014642 0ustar frankfrank#!/bin/sh # Step 1 - netenv must be called during boot if grep 'SuSE Linux' /etc/issue > /dev/null; then echo seems to be a SuSE ... if grep '^/usr/sbin/netenv' /etc/rc.d/boot.local > /dev/null; then echo Found a call to netenv in /etc/rc.d/boot.local ... else echo Installing call to netenv in /etc/rc.d/boot.local ... echo '# Added by package netenv on '`date '+%x %X'` >> /etc/rc.d/boot.local echo /usr/sbin/netenv >> /etc/rc.d/boot.local fi NETWORK_CONFIG_BASEDIR=/etc/sysconfig/network elif grep -i 'Red' /etc/issue | grep -i 'Hat' > /dev/null; then echo seems to be a Redhat ... if grep '^/usr/sbin/netenv' /etc/rc.d/rc.sysinit > /dev/null; then echo Found a call to netenv in /etc/rc.d/rc.sysinit ... else echo Installing call to netenv in /etc/rc.d/rc.sysinit ... echo '# Added by package netenv on '`date '+%x %X'` >> /etc/rc.d/rc.sysinit echo /usr/sbin/netenv >> /etc/rc.d/rc.sysinit fi NETWORK_CONFIG_BASEDIR=/etc/sysconfig/network-scripts else echo Neither SuSE nor RedHat - Please read the docs in /usr/share/doc/packages/netenv exit 1 fi # Check for multiple NIC's if dmesg | grep eth1 > /dev/null 2>&1; then echo according to dmesg you have two or more NICS echo netenv assumes eth0 to be active. Fix manually if this is wrong ! fi # Step 2 - Make the netenv-data (in /tmp/netenv) available to the # system's network configuration procedure if grep '. /tmp/netenv' $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 > /dev/null; then echo /tmp/netenv seems to be already sourced from $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 ... else echo Installing sourcing /tmp/netenv in $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 ... echo '# Added by package netenv on '`date '+%x %X'` >> $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 echo 'if [ -r /tmp/netenv ]; then . /tmp/netenv; fi' >> $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 fi netenv-0.94.3/doc/0040744000175000017500000000000007740324522012646 5ustar frankfranknetenv-0.94.3/doc/index.html0100644000175000017500000000720207740324522014643 0ustar frankfrank Netenv - Using a laptop in different network environments

Do you use your laptop in different network environments ?

At home ? In the office ? At a customers site ?

If yes, the small package "netenv" might be useful for you. When booting your laptop it provides you with a simple interface from which you can choose the current network environment. If you are the first time in an environment, you can enter the basic data for later reuse. Click here to see a screenshot of netenv's interface or - even better - read the documentation.

Click here for english documentation. Wenn Sie deutsch vorziehen, klicken Sie hier

News

Right now I finished 0.94. Some changes are:

If you want it, click here for the tar-file. or here for an rpm-package.

Help wanted

Recently I changed to SuSE 8.1. It seems to me that at least SuSE, RedHat and Mandrake now use /etc/sysconfig and ifup to configure the NICs but there still might be some differences. So when it comes to system start, netenv sometimes may need additional tweaking. This is where you can help me, if you are using e.g. RedHat or Mandrake or Debian or whatever I don't have access to. Checkout netenv on your distribution and give me feedback !

Downloads / Packages / Versions

Debian

Netenv has been around for Debian quite a while . Please check out Debian. Unfortunately they still distribute netenv 0.82 only AFAIK. Frank Kster is working on a new Debian package, see http://www.kuesterei.ch. Thanks Frank !

SuSE / RedHat / Mandrake

SuSE should work out of the box using this rpm-package. RedHat and Mandrake-users should give it a try too.

Mandrake users may want to disable vga=nnn in their lilo.conf due to problems with the splash screen. Furthermore I got reports of problems with netenv on Mandrake. These were caused by Mandrake's cdialog failing.

Conectiva Linux

Fernando M. Roxo da Motta took netenv-0.94-2 and added support for Conectiva Linux. Here are his packages netenv-0.94-1cl.noarch.rpm and netenv-0.94-2cl.src.rpm. Thanks, Roxo !

Older Versions

Here is an RPM-package ready for RedHat 6.1 or 6.2 or 7.0 or the equivalent Mandrake versions . If you are interested in the source, here it is. If you want a tar file, click here

Gerd Bavendiek bav@epost.de

Last modified: Mon Oct 6 19:41:38 CEST 2003 netenv-0.94.3/doc/NEWS0100644000175000017500000000171707712422500013344 0ustar frankfrankChanges between netenv 0.94 - netenv 0.93 * keyword dhcp may be used for new environments * Docs rewritten * Permissions /etc/netenv are checked * Variables BOOTPROTO and STARTMODE introduced for ifup * help option * Examples adopted to current distributions using ifup * Example netenv_setup_debian_example for Debian non PCMCIA-users * Calling netenv_setup with parameter PROFILE Changes between netenv 0.93 - netenv 0.92 * Introducing expert mode. If pressing CANCEL while selecting a network environment, you will be able to get a shell. So you can make a new profile more complex than the standard one. After finishing exit the shell typing exit or -d. Now the new profile will pop up in the list. Yes, this is a security issue. But netenv is made for laptops and so I do not care ... * Offering restart the network if called not from the console (works well in SuSE, others may fail) * Hostnames like foo-bar supported * Introducing this NEWS file netenv-0.94.3/doc/lulu-lavie0100644000175000017500000000072507633441140014650 0ustar frankfrank# -*- sh -*- #****************************************************************** #ident lulu-lavie Time-stamp: <03/03/11 21:09:04 bav> #****************************************************************** # Gerd Bavendiek bav@epost.de 03-03-11 # # Networkenvironment: dhcp using PCMCIA NIC. netenv_id="lavie_pcmcia_dhcp" export BOOTPROTO=dhcp export STARTMODE=hotplug export PRINTER=cc_hp NETSCAPE_PROXY_TYPE=2 FETCHMAIL_POLL_INTERVALL=900 netenv-0.94.3/doc/lulu0100644000175000017500000000220607633444753013563 0ustar frankfrank# -*- sh -*- #****************************************************************** #ident lulu Time-stamp: <03/03/11 21:41:15 bav> #****************************************************************** # Gerd Bavendiek bav@epost.de 98-04-17 # # Networkenvironment: Laptop with LCD 1024x768 and external # Wheel-Mouse. eth0 is setup for home LAN using NIC in docking unit. netenv_id=At_Home_Docking_LCD_WheelMouse_onboard_VPN IPADDR=nnn.nn.nnn.nnn NETMASK=nnn.nnn.nnn.nnn NETWORK=nnn.nn.nnn.nnn BROADCAST=nnn.nn.nnn.nnn GATEWAY=nnn.nn.nnn.nnn SEARCH=foo.bar.com DNS_1=nnn.nn.nn.nn DNS_2=nnn.nn.nn.nn FETCHMAIL_POLL_INTERVALL=900 # If the variable NETENV_SCRIPT points to an executable shell script, # it will be run when netenv is executed NETENV_SCRIPT=/etc/netenv/netenv_setup ICEWM_INCLUDE_FILE=home # This defines my CRT with 1024x768 and a wheelmouse XF86CONFIG_FILE=/etc/X11/XF86Config-4-lcd-wheel # This may be used to edit ~/.netscape/preferences.js NETSCAPE_PROXY_TYPE=2 # This may be used to edit ~/.opera/opera6.ini OPERA_PROXY_FILE=proxy-fsc.ini # NIC is in the docking unit - like it were onboard STARTMODE='onboot' netenv-0.94.3/doc/edit-ns-preferences0100744000175000017500000000361307241243643016436 0ustar frankfrank#!/bin/sh #****************************************************************** # edit-ns-preferences Time-stamp: <01/02/10 14:52:35 bav> #****************************************************************** # Gerd Bavendiek bav@epost.de 99-09-03 # # Tiny hack for editing Netscape's preferences. Takes one of # 1 manual # 2 automatic # 3 direct # as an argument. #------------------------------------------------------------------- # Check argument case $1 in 1|2|3 ) TMPFIL=/tmp/.edit-ns-preferences.$$ cp -p ~/.netscape/preferences.js ~/.netscape/preferences.js.pre ;; *) echo -e $0: 'Usage: edit-ns-preferences [1|2|3]\nwherein 1 is manual, 2 automatic and 3 direct' exit 1 ;; esac # If network.proxy.type _not_ defined, put it in. if grep ^user_pref\(\"network.proxy.type ~/.netscape/preferences.js > /dev/null; then # it's defined awk -v NETSCAPE_PROXY_TYPE=$1 '/^user_pref\(\"network.proxy.type\"\,/ {printf "%s %d);\n", $1, NETSCAPE_PROXY_TYPE; next} {print $0}' ~/.netscape/preferences.js > $TMPFIL else # not yet defined awk -v NETSCAPE_PROXY_TYPE=$1 '/^user_pref\(\"network.proxy.no_proxies_on\"\,/ {printf "%s\nuser_pref\(\"network.proxy.type\", %d);\n", $0, NETSCAPE_PROXY_TYPE; next} {print $0}' ~/.netscape/preferences.js > $TMPFIL fi mv $TMPFIL ~/.netscape/preferences.js exit 0 # 3) echo direkt # # wenn was drinsteht, rausschmeissen. wenn nicht, dann nicht. # awk '/^user_pref\(\"network.proxy.type\"\,/ {next} # {print $0}' ~/.netscape/preferences.js > $TMPFIL exit 0 # The following line count shall make things a little bit saver if [ `cat ~/.netscape/preferences.js | wc -l` -ne `cat $TMPFIL | wc -l` ]; then echo $0: Error in editing ~/.netscape/preferences.js: linecount does not match else echo $0: ~/.netscape/preferences.js has been edited ! mv $TMPFIL ~/.netscape/preferences fi netenv-0.94.3/doc/netenv_setup_debian_example0100744000175000017500000000343607641762171020341 0ustar frankfrank#!/bin/sh #****************************************************************** #ident /etc/netenv/netenv_setup Time-stamp: <03/03/31 08:47:21 bav> #****************************************************************** # Gerd Bavendiek bav@epost.de 03-03-11 # # If there is a variable NETENV_SCRIPT pointing to this executable # file, netenv will source this script during boot. # # This is an Debian-only example. It creates an # /etc/network/interfaces in a hopefully safe manner. # This way non PCMCIA-NIC-users can use netenv on Debian without # further configuration steps. #------------------------------------------------------------------ print_action() { echo -e netenv: $* " ... \c" } print_status() { if [ $? -eq 0 ]; then echo done else echo failed fi } if ! grep Debian /etc/issue >/dev/null 2>&1; then print_action Doing nothing, as this is obviously no Debian echo exit 0 fi # Save /etc/network/interfaces if it has not been created by netenv if grep netenv /etc/network/interfaces >/dev/null 2>&1; then cp -p /etc/network/interfaces /etc/network/interfaces.pre-netenv print_action /etc/network/interfaces was backuped as /etc/network/interfaces.pre-netenv fi print_action creating new /etc/network/interfaces ( echo "# /etc/network/interfaces autogenerated by netenv "`date` echo "# old /etc/network/interfaces backup as /etc/network/interfaces.pre-netenv" echo auto lo echo iface lo inet loopback echo auto eth0 if [ "$BOOTPROTO" = "dhcp" ]; then echo iface eth0 inet dhcp else echo iface eth0 inet static echo address $IPADDR echo netmask $NETMASK echo network $NETWORK echo broadcast $BROADCAST echo gateway $GATEWAY fi ) > /etc/network/interfaces print_status done netenv-0.94.3/doc/netenv-chooser-box.png0100644000175000017500000001210507633367657017120 0ustar frankfrankPNG  IHDR_PLTEJMJ(? H pHYsJK ,}IDATxK۶Ezq|t%ݲ<H4WCH'<'w/@+T %mA K//B!B!B!||p,P8 C`( 3Y_9⩨) p0P8 C`( M9f uڶM9i:K0#x}i?P(_@v즻48ß)/طw;E@%=m:p/|>Å30mlq,\>[2)RT9Lw/ԶיT渤̘8S_zp[2)+|٠#U24:cOѝ?Z]Rd#\*ףYWx$Β$YYɊ_4 J3$\Ä`>OyY1׾SCsxTxrx"ů5!MN>+ٝf/m"^R/E [$%[Νp*dתcQXGw%hZ7fsXv^\![ݧ;֭Z7P8 qmכ C`( p0P8 C`( p0P8 C`( p0fpqV:8qg n1 Ϟ^3Oph$ބ·*R(hgXi{л{4_𽑞}|HUs8>Mq}8YSzdԊXKtg^&+CIsHVOgUam֏ON){ٮ^ʓE1fpcz4JF;mGqhUs٬^U=9t;59:p`1];MӽhʵZ ]IT.|ަ>^:arxVԒjaå[$=N]F =cKƽ+Fg_ٟ_LrVx>rwwQT 'I-X#ˆ C`( p0P89%!E;K"·P8 C`( p0fK_^J{Yٱ) r^g?os~9Q\&-N-Nъ;{v& ;"{%̰X( _ۣݾ n OV!+HA [^/ 0]y{_+]z*Ͱp?I2Ys?tMw{.M۪ oUv+ "ŤWnMHqlmkd5_xv̉/6(|:U+Dҙ?Dz&h2ބY r3aƥ,"\&qSdMm%S}{d)Y{< Ϯyݒ3_6_k- _X ͈ph*3$Z^U).+›:Õg7SxW o=΋fZ36{4M3q/uN?մ39h\4}i]4Τ X>$YRBXT^<̟[BrjLcKo4barf+EF- p0P8 N=ݛ[.A`v,5N3v,|AŇnuW3Eul5idVk4񞘮U5g@ V g.1@Rx]K~h s= 0~%!npx'fw;Ľ{bja g~j:`O<@e> CdhO3I2mYo!>fdۂkߍ.&v: zGv5]mc:"B"%+N7.RIŎkߥǣ{.܌ӜܹtQt*pQ"ŶкagN}.9ӜܹR:kJ(\w~x޺GИ4gtL/JxtjY/  O[KenuRZ(3 ~GsfDxUXY.GʅbnMhYOsrNMn-eΕWbퟹ-E#yv^QJB3w:%P8F|P8 }|*l탋`^)e8L ӁHaR|+A{l"">)ܵɎ,`҈e&(!NL1jN$:fMLLS 'T;=6AWr9'C6 cpNnqR}tR_c|W@fl$Z eoǜmC GwA`(́P8G?Rvhxf[]ߣ|g'  ۧeG>dC7NtpS}AjVXس*ۮ^|H3 IJ{K{]fgd>ͼӤpi~'*1l`SV -< b"b~"|ZdOm,Yj#Vh!ALp#RF+Ry|QLFA̝ M4 ,i ]oܙUݦ؆^}\ c 1M{YTXjڽӜӔ6`TZ 1W.yxn^obR-t8)BX*|LjZ&:‡q0P8] L0(޸Qٻ'OKک5PTV>H(1͉yB11*(!I]84UY3P5dO#<Ӝ#M9UW\`{kǴB+I'4ExT5OL /J+2 4f)O6Ĩ(cpӼc s oE/K",ln(JtEXtsignatureb3169353f3ff2dfa2f1c244ba1d06198063da977c82edf00a11bf6b67e3b4633CĖIENDB`netenv-0.94.3/doc/netenv-de.html0100644000175000017500000007420407642360223015426 0ustar frankfrank Netenv 0.94 - Linux Laptop in verschiedenen Netzwerkumgebungen

Nutzen Sie einen Linux Laptop in verschiedenen Netzwerkumgebungen ?

Zu Hause ? Im Bro ? Bei einem Kunden ?

Falls ja, kann das kleine Paket netenv ntzlich fr Sie sein. Beim Booten des Laptops knnen Sie die aktuelle Netzwerkumgebung mit Hilfe eines einfachen Mens auswhlen. Sind Sie zum ersten Mal in einer Umgebung, so knnen Sie einige Grunddaten zur spteren Verwendung eingeben.

Netenv erstellt eine Datei mit einigen Variablen, die die aktuelle Netzwerkumgebung beschreiben. Diese Datei wird dann beim PCMCIA-Start benutzt (so z.B. in Debian, RedHat und SuSe). Der Mechanismus kann auch fr Laptops genutzt werden, die eine Netzwerkkarte (oft NIC genannt) onboard haben.

So sieht die Auswahlbox von netenv aus:

Neben der Grundfunktionalitt der Konfiguration der NIC kann netenv fr weitere Aufgaben genutzt werden:

Netenv gibt es als Paket fr Debian und RedHat Linux. Mandrake- und SuSe-Benutzer knnen das RedHat-Paket benutzen. Selbstverstndlich ist auch ein tar-File verfgbar. Fr das Mensystem bentigt netenv dialog(1) bzw. gdialog (in den genannten Distributionen immer enthalten).

Ein Wort an alle Experten: Ich versuche hier, die Dinge mit Blick auf Nicht-Experten zu erklren - also bitte Geduld.


Inhaltsbersicht

Was macht netenv ?

Wo bekommt man netenv ?

Hinweise zur Installation

Grundlagen

Erstes Erstellen einer Umgebungsbeschreibung

Konfiguration

Beispiele

Bemerkungen zu DNS

Bemerkungen fr SuSe 7.3 Benutzer

Alternativen zu netenv

Schluwort


Wo bekommt man netenv ?

Netenv hat eine Webseite bei Sourceforge: http://netenv.sourceforge.net

Aber das wissen Sie wohl schon ...

Dort ist sowohl das tar-File als auch das RedHat-Paket verfgbar. Letzteres sollte auch fr Mandrake und Suse benutzbar sein.

Debian-User

Netenv gibt es schon recht lange als Debian-Paket. Nheres siehe unter http://www.debian.org/distrib/packages.

Zurck zur Inhaltsbersicht

Hinweise zur Installation

Hngt natrlich von der Distribution ab. Bei allen, die rpm-Pakete benutzen, als root z.B.:
rpm -i netenv-0.94-2.i386.rpm
In Debian z.B.:
dpkg -i netenv-0.92-2.i386.deb
Andernfalls:
tar xvf netenv-0.94-2.tar
Es wird damit ein Shellskript namens netenv, ein kleines Hilfsprogramm trpnc, Konfigurationsbeispiele sowie diese Doku installiert. Abhngig von der Distribution ist nun ein wenig Handarbeit ntig - oder eben auch nicht.

RedHat

Ich habe keine Kenntnis ber aktuelle RedHat-Versionen. Wahrscheinlich sind die folgenden Hinweise vllig veraltet. Vielleicht finden sich im Abschnitt
Zur Verwendung des tar-files ntzliche Hinweise.

Das netenv-RPM wurde unter RedHat 6.1 gepackt. Damit kann es in allen Distributionen, die RPM nutzen, installiert werden.

Das Postinstall-Script sorgt dafr, da

/etc/rc.d/rc.sysinit sieht dann wie folgt aus:
lulu:/home/bav> tail -2 /etc/rc.d/rc.sysinit
# Added by package netenv on 06.03.2000 19:53:10
/usr/sbin/netenv
Ferner wird /etc/sysconfig/network-scripts/ifcfg-eth0 gendert. Direkt nach der Erstinstallation von Redhat sieht diese Datei z.B. so aus:
lulu:/etc/sysconfig/network-scripts>>> cat ifcfg-eth0 
DEVICE=eth0
BROADCAST=192.168.200.255
IPADDR=192.168.200.201
NETMASK=255.255.255.0
NETWORK=192.168.200.0
ONBOOT=yes
Die Installation von netenv fgt zwei Zeilen hinzu:
lulu:/etc/sysconfig/network-scripts>>> tail -3 ifcfg-eth0
ONBOOT=yes
# Added by package netenv on 06.03.2000 19:53:10
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi

SuSe

Mit Suse 8.x haben sich beim Systemanlauf und bei der Netzwerkkonfiguration eine Vielzahl von nderungen ergeben. Die aktuelle Prozedur geht von Suse 8.1 aus, sollte jedoch auch mit 8.0 funktionieren. Fr ltere Versionen siehe den nchsten Abschnitt.

SuSe 8.1

Das Postinstall-Script fgt zwei Zeilen zu /etc/init.d/boot.local hinzu:
lulu:/etc/init.d> tail -3 boot.local
#
# Added by package netenv on 06.12.2002 10:45:10
/usr/sbin/netenv
Damit wird dafr gesorgt, da netenv beim Systemanlauf berhaupt aufgerufen wird. Netenv nimmt als zu konfigurierende NIC eth0 an. Daher wird an die Datei
/etc/sysconfig/network/ifcfg-eth0
die Zeile
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
angehngt. Das ganze sieht dann wie folgt aus:
lulu:/etc/sysconfig/network> cat ifcfg-eth0
FIREWALL="YES"
BOOTPROTO='static'
BROADCAST='nn.nn.nn.nn'
IPADDR='nn.nn.nn.nn'
NETMASK='nn.nn.nn.nn'
NETWORK='nn.nn.nn.nn'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='oxTw.yHaVEFCrUXE'
WIRELESS='no'
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
Die Eintrge IPADDR, NETMASK usw. rhren von der Grundinstallation her und brauchen nicht gelscht werden. Sie werden durch die Zuweisungen in /tmp/netenv bersteuert. In diesem Beispiel wird unterstellt, da die verwendete NIC keine PCMCIA-Karte ist. Falls doch, mu aus
STARTMODE='onboot'
STARTMODE='hotplug'
werden.

SuSe 7.3

Das Postinstall-Script fgt zwei Zeilen zu /etc/rc.d/boot.local hinzu:
mweb@guru:/etc/rc.d > tail -3 boot.local 
# before we're going to the first run level.
#
# Added by package netenv on 06.02.2001 20:28:10
/usr/sbin/netenv
Fr PCMCIA-Karten wird ein Eintrag in /etc/pcmcia/network.opts vorgenommen:
mweb@guru:/etc/pcmcia > tail -2 network.opts 
esac
# Added by package netenv on 06.02.2001 20:28:10
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
Falls das Laptop eine eingebaute Netzwerkkarte hat und so auf PCMCIA verzichtet werden kann, knnen die mit YAST eingetragenen Parameter wie folgt bersteuert werden (manuell eintragen !):
mweb@guru:/etc/rc.d > head -16 network 
#! /bin/sh
# Copyright (c) 1996 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# Author: Florian La Roche , 1996
#       Werner Fink , 1996
#       Burchard Steinbild , 1996
#       Rolf Haberrecker , 1998
#       Werner Fink  (based on a patch of Andries Brouwer) 1999
#
# /sbin/init.d/network
#

. /etc/rc.status
. /etc/rc.config
if [ -r /tmp/netenv ] ; then . /tmp/netenv; fi

Debian

Das Debian-Paket netenv wird aktuell berarbeitet. Soweit mir bekannt, knnen PCMCIA-NIC's ohne weitere Konfiguration genutzt werden.

Onboard-NIC's allerdings erfordern eine genderte /etc/network/interfaces. Man kann das mit netenv-Mitteln machen, siehe das Beispielskript netenv_setup_debian_example. Tut man nichts, wird die NIC immer so wie bei der Systeminstallation konfiguriert - ganz gleich, was man in netenv ausgewhlt hat.

Mandrake

Mandrake 9 User berichteten, da der splash-screen abgeschaltet werden mu (disable vga=nnn in /etc/lilo.conf), da andernfalls keine Eingabe whrend des Systemanlaufs mglich ist. Ferner scheint das verwendete cdialog nicht stabil zu sein. Erst durch Einsatz eines SuSe-dialog konnte der Fehler behoben werden.

Zur Verwendung des tar-Files

Folgende Schritte sind zu tun:
tar zxvf netenv-0.94-2.tar.gz
cd netenv-0.94-2
make
make install # ab hier mu das als user root geschehen !
make config
Abhngig von der Distribution mu der letzte Schritt zur Einbindung von netenv make config evtl. manuell vorgenommen werden.

netenv mu vor dem normalen Netzwerk- oder PCMCIA-Start aufgerufen werden. Suchen Sie nach /etc/init.d/boot.local oder einem quivalent. Fr weitere Details siehe den SuSE 8.1 Abschnitt.

Nachdem so sichergestellt ist, da netenv beim Systemanlauf aufgerufen wird, mssen die Konfigurationsdaten von den Netzwerk scripts gelesen werden. Aktuelle Distributionen nutzen ifup um eine vorkonfigurierte Netzwerk-Karte zu starten. Dann siehe den SuSE 8.1 Abschnitt fr weitere Details.

Eine hufige Fehlerquelle besteht in der Verwechslung von eth0 und eth1 wenn es eine onboard NIC und eine PCMCIA NIC. Oft ist eth0 onboard und eth1 PCMCIA NIC. Man kann das mit dmesg | grep eth und lspci berprfen.

Netenv prft ob eine eth1 vorhanden ist. Dies ist allerdings unzulnglich, da der Laptop zum Zeitpunkt der Installation vielleicht gerade in einer anderen Konfiguration betrieben wurde.

Zurck zur Inhaltsbersicht

Grundlagen

Die grundlegende Idee ist, da der Laptopbenutzer whrend des Bootvorgangs eine Information darber eingibt, wo er sich mit seinem Laptop gerade befindet. Dies geschieht vor dem Erreichen des run level 2, d.h. also bevor eine Netzwerkkarte konfiguriert wird.

Dazu wird dialog(1) benutzt, ein einfaches und den meisten Benutzern vertrautes Mensystem. Der Bootvorgang wird solange angehalten, bis der Benutzer seine Wahl getroffen hat. Fr eine voreingestellte Umgebung reicht es, einmal CR zu drcken.

Wenn man "lilo" als Bootmanager benutzt, kann man alternativ auch z.B. eingeben:

linux NETENV=lavie
Damit wird eine Shellvariable "NETENV" mit dem Wert "lavie" definiert. In meinem Fall heit das: Ich bin mit meinem Laptop namens lulu im Bro. Die Datei mit den Zuweisungen fr IP-Addresse usw. hat den Namen /etc/netenv/lulu-lavie. Der Linuxkern startet den init-Prozess mit der Variablen NETENV als Teil seiner Umgebung. Das gleiche tut dann init mit den sog. rc-Skripten.

Das netenv-Skript prft, ob NETENV gesetzt ist. Falls ja, wird der Hochlauf fortgesetzt, ohne da das Auswahlmen erscheint.

Wenn die aktuelle Umgebung bestimmt ist, kopiert netenv die zugehrige Beschreibungsdatei nach /tmp/netenv.

Diese Datei hat die Rechte 644, ist also von jedem Benutzer lesbar. Sie kann so fr benutzerspezifische Konfiguration genutzt werden.

Zurck zur Inhaltsbersicht

Erstes Erstellen einer Umgebungsbeschreibung

Nach der Installation sollte der Benutzer root netenv aufrufen. Dazu:
netenv
Es erscheint eine Eingabemaske, die nur eine Wahlmglichkeit bietet:
    new  Set_up_new_environment  
Es werden dann nacheinander abgefragt:
   Enter the current IP-Address or the keyword dhcp ...
   Enter the netmask of the current subnet ...
   Enter the IP-Address of the current network ...
   Enter the Broadcast-Address of the current network ...
   Enter the Gateway-Address of the current network ...  
   Enter the IP-address of the current nameserver ...  
Falls man sich in einem Netzwerk mit DHCP-Server befindet, gibt man statt der IP-Addresse dhcp ein. Es wird dann eine /tmp/netenv erstellt, die nur
BOOTPROTO='dhcp'
STARTMODE='hotplug'
enthlt. Alle anderen Werte werden dann gem der DHCP-Konfiguration ermittelt. Falls die NIC onboard ist, sollte netenv
STARTMODE='onboot'
gesetzt haben.

Bei statischer IP-Addresse wird nach Eingabe des Wertes fr die folgenden Werte ein in vielen Fllen sinnvoller Vorschlag eingeblendet.

Es kommt dann die Frage, ob diese Konfiguration gesichert werden soll:

    Do you want to save this configuration ?
Fr den Namen, den man hier angibt, bitte keine Leerzeichen verwenden !

netenv bietet abhngig von der Distribution an, das Netzwerk zu restarten und so die nderungen zu aktivieren.

Andernfalls kann man bei einer PCMCIA-NIC entweder die Karte entnehmen und wieder einfhren oder als Benutzer root das PCMCIA-Skript ausfhren:

/etc/init.d/pcmcia restart
In beiden Fllen sollte der cardmanager aus dem PCMCIA-Paket aktiv werden und die Schnittstelle konfiguriert werden.

Ein ping auf die angegebene Gateway-Addresse wird es zeigen !

Falls nicht: Leuchtet die Link-LED ? Prfen Sie die Ausgabe von

ifconfig eth0

Das gerade beschriebene Vorgehen ist auch dann zu whlen, wenn bei laufendem Laptop zwischen zwei Netzwerkumgebungen gewechselt werden soll. Auch hier ist ein Reboot nicht ntig - wir nutzen ja Linux ...

Diejenigen, die statt PCMCIA eine Netzwerkkarte onboard nutzen, mssen ihr Netzwerk restarten.

In RedHat 7.0 oder SuSE dazu z.B..

/etc/init.d/network restart
Netenv fhrt dies bei entsprechender Besttigung aus.

Zurck zur Inhaltsbersicht

Konfiguration

Netenv wird mit Beschreibungdateien konfiguriert. Diese liegen in /etc/netenv. Auf einem Laptop mit dem Namen "lulu" werden Dateien lulu, lulu-foo, lulu-bar usw. ausgewertet. Das Namensschema ist damit wie folgt:
/etc/netenv/<NODE-NAME>-<VALUE-OF-VARIABLE-NETENV>
Die Datei, die den Hostnamen des Laptops hat, erscheint im Auswahlmen immer ganz oben. Hier reicht also einmal auslsen, um den Bootvorgang fortzusetzen. In dieser Datei sollte also sinnvollerweise die Beschreibung der am hufigsten genutzten Netzwerkumgebung liegen.

Die Beschreibungsdateien enthalten Zuweisungen in Shell Syntax, z.B.

netenv_id=At_Home_LCD_WheelMouse_pcmcia
...
IPADDR=123.456.78.9
...
NETSCAPE_PROXY_TYPE=2
Leerzeichen fhren hier (wie immer in der Shell) zu Problemen. Fr eine erfolgreiche Konfiguration einer Netzwerkkarte sind mindestens Zuweisungen von
IPADDR
NETMASK
NETWORK
BROADCAST
erforderlich. Abhngig von der jeweiligen Situation kann auch
GATEWAY
DNS_1
notwendig sein. Man kann hier beliebige Variablendefinitionen einfgen - Hauptsache, alles bleibt syntaktisch korrekt. Eine Zuweisung in der Form
NETENV_SCRIPT=/etc/netenv/netenv_setup
nimmt eine Sonderstellung ein. Wenn die hier angezogene Datei lesbar ist, wird netenv diese Datei nach der Auswahl der aktuellen Netzwerkumgebung ausfhren (genauer: sourcen).

Achtung ! Dies gescheht in einem frhen Status des Bootvorgangs. Es ist noch kein Netzwerk aktiv ! NETENV_SCRIPT wird mit root-Rechten ausgefhrt !

Mit Hilfe des hier angezogenen Skriptes kann man dann etliche sinnvolle Sachen machen. Dazu mehr bei den Beispielen.

Experten Modus

Wenn man in der netenv-dialog-box CANCEL whlt, kann man in eine shell verzweigen. Verlt man diese, steht die Auswahlbox erneut zur Verfgung. Sicherheitshinweis: Das Verzeichnis /etc/netenv und darin liegende Dateien drfen nur fr den Benutzer root schreibbar sein. netenv prft dies.

Zurck zur Inhaltsbersicht

Beispiele

Dies ist natrlich der bei weitem wichtigste Abschnitt dieser Doku ...

Diese Beispiele sind aufeinander aufbauend beschrieben. Also bitte hintereinander lesen !

StandAlone_Touchpad

lulu:/etc/netenv>>> cat lulu-touch-pad 
netenv_id=StandAlone_Touchpad_no_eth
STARTMODE=manual
export XF86CONFIG_FILE=/etc/X11/XF86Config-4-lcd-touch
NETENV_SCRIPT=/etc/netenv/netenv_setup
# This may be used to edit ~/.netscape/preferences.js
NETSCAPE_PROXY_TYPE=3
Dies nutze ich, wenn mein Laptop keine Verbindung zu einem Netz hat.

Der Wert der Variablen netenv_id (wie gesagt: Bitte ohne Leerzeichen) wird als Beschreibung im Auswahlmen benutzt.

Es wird keine IP-Addresse zugewiesen. Durch das STARTMODE=manual wird beim Systemanlauf keine NIC konfiguriert. Ich setze NETENV_SCRIPT=/etc/netenv/netenv_setup. Dieses ist eine Datei mit Shell-Befehlen. Sie ist dieser Dokumentation hier beigefgt.

Das Beispiel ist einfach gehalten und kann so als Ausgangsbasis fr eigene Anpassungen dienen. Hier relevanter Code ist:

lulu:/etc/netenv>>> cat netenv_setup
...
# Simple way to configure the X-Server 
if [ -r $XF86CONFIG_FILE ]; then
    echo $XF86CONFIG_FILE will be used for configuring the X-Server ...
    mv /etc/X11/XF86Config /etc/X11/XF86Config.old
    ln -s $XF86CONFIG_FILE /etc/X11/XF86Config
fi
...
Da ich XF86CONFIG_FILE einen Wert zugewiesen habe, wird ein Link angelegt. Diesmal von der Beschreibungsdatei, die ich fr mein LCD mit Touchpad erstellt habe.

Typischerweise fhre ich mit netenv_setup alle die Aktionen aus, fr die der User root ntig ist und die das ganze Systeme betreffen. Einstellungen hingegen, die nur fr meine Arbeitsumgebung wichtig sind, werden in meiner .xinitrc getroffen. Dazu ein Beispiel:

NETSCAPE_PROXY_TYPE nutze ich in meiner ganz privaten Konfiguration:

lulu:/home/bav> cat .xinitrc
#!/bin/sh
...
if [ -r /tmp/netenv ]; then
. /tmp/netenv
fi
if [ -n "$NETSCAPE_PROXY_TYPE" ]; then
   ~/tools/edit-ns-preferences $NETSCAPE_PROXY_TYPE
fi
...
Das angezogene Skript edit-ns-preferences findet sich bei der netenv-Dokumentation. Ich vermeide so unntige Network-Timeouts, wenn ich den Browser starte.

In_the_Office

lulu:/etc/netenv>>> cat lulu-lavie
# Networkenvironment: netask
netenv_id="lavie_pcmcia_dhcp"
export BOOTPROTO=dhcp
export STARTMODE=hotplug
export PRINTER=cc_hp
NETSCAPE_PROXY_TYPE=2
FETCHMAIL_POLL_INTERVALL=900
Im Bro bekomme ich meine Netzwerkkonfiguration von einem DHCP-Server. STARTMODE=hotplug ist gesetzt, weil mein Laptop keine onboard-NIC hat und daher die PCMCIA-NIC genutzt werden mu.

Mit PRINTER=cc_hp wird der Defaultdrucker auf den Drucker im Bro gesetzt. NETSCAPE_PROXY_TYPE=2 aktiviert die automatische Proxykonfiguration im Netscape.

Wenn ich im Bro arbeite, mchte ich, das zyklisch Email abgeholt wird. Dazu dient FETCHMAIL_POLL_INTERVALL. Folgende Zeilen in meiner ~/.xinitrc starten fetchmail als Dmon, der dann alle 15 min gem den Definitionen in meiner ~/.fetchmailrc arbeitet:

if [ -n "$FETCHMAIL_POLL_INTERVALL" ]; then 
   fetchmail -d $FETCHMAIL_POLL_INTERVALL
fi

Laptop_at_home

Zu Hause nutze ich folgende Beschreibungsdatei. Da ich meistens hier arbeite, ist der Dateiname gleich dem Nodenamen meines Laptops und damit der Default. Es reicht also, im Netenv-Auswahlmen einmal auszulsen:
lulu:/etc/netenv>>> cat lulu
netenv_id=At_Home_Docking_LCD_WheelMouse_onboard_VPN
IPADDR=nnn.nn.nnn.nnn
NETMASK=nnn.nnn.nnn.nnn
NETWORK=nnn.nn.nnn.nnn
BROADCAST=nnn.nn.nnn.nnn
GATEWAY=nnn.nn.nnn.nnn
SEARCH=foo.bar.com
DNS_1=nnn.nn.nn.nn
DNS_2=nnn.nn.nn.nn

FETCHMAIL_POLL_INTERVALL=900

# If the variable NETENV_SCRIPT points to an readable file,
# it will be run when netenv is executed
NETENV_SCRIPT=/etc/netenv/netenv_setup
ICEWM_INCLUDE_FILE=home
# This defines my CRT with 1024x768 and a wheelmouse
XF86CONFIG_FILE=/etc/X11/XF86Config-4-lcd-wheel
# This may be used to edit ~/.netscape/preferences.js
NETSCAPE_PROXY_TYPE=2
# This may be used to edit ~/.opera/opera6.ini
OPERA_PROXY_FILE=proxy-fsc.ini

# NIC is in the docking unit - like it were onboard
STARTMODE='onboot'
Aus der netenv_setup ist hier folgender Abschnitt von Bedeutung:
lulu:/etc/netenv>>> cat netenv_setup
...
PROFILE=$1
...
if [ "$PROFILE" = "default" ]; then
   print_action linking /dev/pilot
   rm -f /dev/pilot; ln -s /dev/ttyS0 /dev/pilot
   print_status
   print_action calling ptal-init start
   /usr/sbin/ptal-init start 
   print_status
else
   # When there is no docking station, start irattach appropiately and
   # link /dev/pilot to ircomm0.
   print_action running irattach
   /usr/sbin/irattach /dev/ttyS3 -s
   print_status
   print_status linking /dev/pilot
   rm -f /dev/pilot; ln -s /dev/ircomm0 /dev/pilot
   print_status
fi
...
netenv_setup wird mit dem Parameter PROFILE aufgerufen, der hier den Wert "default" hat (sonst immer Name der Beschreibungsdatei abzglich Hostname).

Zu Hause habe ich einen Cradle fr meinen Palm. Daher sorge ich dafr, da /dev/pilot auf den entsprechenden seriellen Anschlu zeigt. Ferner mu die Software fr meinen HP Officejet gestartet werden. In allen anderen Umgebungen kann ich den Palm nur ber IRDA ansprechen. ptal braucht dann nicht gestartet werden.

Zu Hause befindet sich mein Laptop in einer Docking-Unit. Diese enthlt eine NIC. Um diese zu verwenden, mu

STARTMODE='onboot'
gesetzt werden.

At_Customer_Foobar

Frhere Versionen der libc boten einem nicht privilegierten Benutzer die Mglichkeit, durch Setzen der Umgebungsvariablen HOSTALIASES quasi eine private /etc/hosts anzulegen. Aus Sicherheitsgrnden steht dieser Weg in aktuellen Distributionen nicht mehr zur Verfgung.

Will man nun seine /etc/hosts nicht jedesmal manuell editieren, kann folgender Mechanismus helfen. Fr mich ist er auch deshalb praktisch, wenn ich in unterschiedlichen Umgebungen Rechner mit gleichen Namen aber unterschiedlichen IP-Nummern antreffe.

Ich habe in meine /etc/hosts Marken wie folgt eingetragen:

lulu:/home/bav> cat /etc/hosts
...
# netenv hosts begin
# netenv hosts end
...
In meiner aktuellen Beschreibungsdatei definiere ich eine Reihe von Rechnern mit den dazugehrigen IP-Addressen, die ich erreichen mchte:
NETENV_HOST_ENTRIES="192.168.10.11 abba:192.168.10.12 bebe:192.168.10.3  alfa-sw:\
192.168.10.4  beta-sw:192.168.10.13 coca:192.168.10.14 cola"
Folgendes Codefragment aus meiner /etc/netenv/netenv_setup sorgt nun dafr, da nach Auswahl der Umgebung automatisch /etc/hosts editiert wird:
if [ -n "$NETENV_HOST_ENTRIES" ]; then
   if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then
      (
      awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts
      echo $NETENV_HOST_ENTRIES | awk -F'\:' '{ for ( j=1; j<=NF; j++ ) print $j }'
      awk '/^# netenv hosts end$/,/*/' /etc/hosts
      ) > /etc/hosts.netenv
      mv /etc/hosts.netenv /etc/hosts
      chmod 644 /etc/hosts
      echo netenv_setup: /etc/hosts was modified ...
   fi
else
   if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then
      (
      awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts
      awk '/^# netenv hosts end$/,/*/' /etc/hosts
      ) > /etc/hosts.netenv
      mv /etc/hosts.netenv /etc/hosts
      chmod 644 /etc/hosts
      echo netenv_setup: /etc/hosts was cleaned up ...
   fi
fi
Die /etc/hosts stellt sich danach wie folgt dar:
...
# netenv hosts begin
192.168.10.11 abba
192.168.10.12 bebe
192.168.10.3 alfa-sw
192.168.10.4 beta-sw
192.168.10.13 coca
192.168.10.14 cola
# netenv hosts end
...
Alle diese Rechner sind fr mich vertrauenswrdig, daher nutze ich in meiner ~/.xinitrc diesen Mechanismus und sorge noch dafr, da automatisch X-Displays von diesen Rechner akzeptiert werden:
XHOST_PLUS_LISTE=`awk '/^# netenv hosts begin$/,/^# netenv hosts end$/' /etc/hosts | awk '!/^#/ {print $2}'`
xhost $XHOST_PLUS_LISTE
Anschlieend liefert xhost mir dann:
lulu:/home/bav> xhost 
access control enabled, only authorized clients can connect
INET:cola
INET:coca
INET:beta-sw
INET:alfa-sw
INET:bebe
INET:abba

Zurck zur Inhaltsbersicht

Bemerkungen zu DNS

Netenv nimmt keine DNS Konfiguration vor. Leider gibt es gerade hier etliche Unterschiede zwischen den Distributionen.

Der Mechanismus, den David Hinds in seinem PCMCIA-Paket implementiert hatte, schien mir immer hinreichend (Skript network, Teil des pcmcia-package). Ein Ausschnitt macht deutlich, was dort geschieht:

        # Update DNS stuff
        cp /etc/resolv.conf /etc/resolv.new
        echo "# $DEVICE begin" >> /etc/resolv.new
        test "$DOMAIN" && echo "domain $DOMAIN" >> /etc/resolv.new
        if [ "$DNSSRVS $DNS_1 $DNS_2 $DNS_3" != "   " ] ; then
            for DNS in $DNSSRVS $DNS_1 $DNS_2 $DNS_3 ; do
                echo "nameserver $DNS" >> /etc/resolv.new
            done
        fi
        echo "# $DEVICE end" >> /etc/resolv.new
        mv /etc/resolv.new /etc/resolv.conf
Die Datei /etc/resolv.conf wird auf eine temporre umkopiert. Wenn eine der Variablen DOMAIN, DNSSRVS, DNS_1, DNS_2 oder DNS_3 einen Wert haben, werden die entsprechenden Kommandos abgesetzt. Dieser neue Abschnitt beginnt mit z.B. # eth0 begin und endet mit z.B. # eth0 end. Dies wird beim Beenden des PCMCIA-Services benutzt, um diesen Abschnitt wieder zu entfernen. Danach wird die /etc/resolv.conf wieder im Originalzustand sein.

Um dies zu nutzen, ist es also hinreichend, z.B. DNS_1 zu setzen.

Wenn man das mit netenv machen mchte, kann z.B. folgender Code in /etc/netenv/netenv_setup eingefgt werden:

if [ ! -z "$DNS_1" ]; then 
    (
    echo "# resolv.conf autogenerated by netenv "`date`
    if [ ! -z "$DOMAIN" ]; then echo domain $DOMAIN; fi
    if [ ! -z "$SEARCH" ]; then echo search $SEARCH; fi
    echo nameserver $DNS_1
    if [ ! -z "$DNS_2" ]; then echo nameserver $DNS_2; fi
    ) > /etc/resolv.conf
    chmod 644 /etc/resolv.conf
    echo netenv: /etc/resolv.conf was set up ...
fi

Zurck zur Inhaltsbersicht

Bemerkungen fr SuSe 7.3 Benutzer

Wenn man eine Onboard-Ethernetschnittstelle hat (also gar keine PCMCIA-NIC nutzen mu), mu der normale Eintrag in /etc/rc.config bersteuert werden. Dies geschieht durch eine Zuweisung der Form
IFCONFIG_0="172.25.64.130 broadcast 172.25.64.255 netmask 255.255.255.0 up"
Wenn man hingegen DHCP verwenden mchte, mu der Eintrag
IFCONFIG_0="dhcpclient"
lauten. Dies kann mit mit netenv wie folgt tun. Zunchst das zugehrige Profil:
elli:/etc/netenv> cat elli-ht 
# Networkenvironment: DHCP
export USE_DHCP=yes
NETENV_SCRIPT=/etc/netenv/netenv_setup
Ferner braucht man ein netenv_setup-Skript mit mindestens folgendem Inhalt:
elli:/etc/netenv> cat netenv_setup
edit_rc_config()
{
   if [ ! -r /etc/rc.config ]; then
      echo No /etc/rc.config, probably not a SuSE-System, giving up ...
      return 1
   fi
   VARIABLE_TO_CHANGE=$1
   shift
   echo ${VARIABLE_TO_CHANGE}'="'$*'"' > /tmp/.netenv.tmp.$$
   LINE=`awk '/^'$VARIABLE_TO_CHANGE'=/ {LINE=NR} END {print LINE}' /etc/rc.config`
   awk -v LINE=$LINE 'NR /tmp/.rc.config.netenv 
   cat /tmp/.netenv.tmp.$$ >> /tmp/.rc.config.netenv
   awk -v LINE=$LINE 'NR>LINE' /etc/rc.config >> /tmp/.rc.config.netenv 
   cat /tmp/.rc.config.netenv > /etc/rc.config
   rm -f /tmp/.rc.config.netenv /tmp/.netenv.tmp.$$
   echo netenv_setup: rc.config edited, Variable $VARIABLE_TO_CHANGE set to $*
}


if [ "$USE_DHCP" = yes ]; then
   edit_rc_config IFCONFIG_0 dhcpclient 
else
   edit_rc_config IFCONFIG_0 "$IPADDR broadcast $BROADCAST netmask $NETMASK up"
fi

Fr das statische Routing nutzt SuSe die Datei /etc/route.conf. Eine Default-Route sieht hier wie folgt aus:

default                 172.246.2.1
Ausgehend von dem Beispiel, in dem gezeigt wird, wie man mit netenv die /etc/hosts editiert, kann man hier entsprechend vorgehen. Als Beispiel:
if grep SuSE /etc/issue 1>/dev/null; then
   if [ ! -z "$GATEWAY" ]; then
    (
    echo "# route.conf autogenerated by netenv "`date`
    echo default $GATEWAY 0.0.0.0 eth0
    ) > /etc/route.conf
    echo netenv_setup: /etc/route.conf was modified ...
   fi
fi

Zurck zur Inhaltsbersicht

Alternativen zu netenv

Wie so oft in Linux gibt es Auswahl. Alternativen zu netenv sind im Linux on the Road - A Guide for Laptops and Mobile Devices von Werner Heuser beschrieben.

Die, die ich nher angeschaut habe, versuchen, die Netzwerkumgebung zu bestimmen, indem sie entsprechende arp requests versenden. SuSe liefert mit 8.x das System Configuration Profile Management scpm. Dies ist sicherlich mchtig, mir fehlt jedoch ein Benutzerinterface beim Booten.

Zurck zur Inhaltsbersicht

Schluwort

Ich hoffe, netenv wird Ihnen ntzlich sein. Bei Fragen und Kommentaren senden Sie eine Mail an bav@epost.de.

Zurck zur Inhaltsbersicht


Gerd Bavendiek
Last modified: Tue Apr 1 20:55:15 CEST 2003 netenv-0.94.3/doc/netenv-en.html0100644000175000017500000006702007642360251015437 0ustar frankfrank Netenv 0.94 - Using a laptop in different network environments

Do you use your laptop in different network environments ?

At home ? In the office ? At a customers site ?

If yes, the small package netenv might be useful for you. When booting your laptop it provides you with a simple interface from which you can choose the current network environment. If you are the first time in an environment, you can enter the basic data for later reuse.

Netenv sets up a file containing variable assignments which describe the current environment. This can be used by the pcmcia setup scheme (e.g. like the one that comes with Debian, RedHat and SuSe). If you have a Network Interface Card (often simpy called NIC) onboard, you can use the same mechanism.

Have a look at netenv's chooser box:

Besides the basic functionality of configuring the NIC, the netenv data can be used for thinks like:

Netenv is available prepackaged for Debian and Redhat Linux as well as tarball. Mandrake- and SuSe-Users may use the RedHat-RPM. netenv depends on dialog(1) resp. gdialog (which comes with the mentionend distributions).

A word to all gurus: In this docu I try to explain things with Linux novices in mind, so be patient.


Table of Contents

What does netenv do ?

Where to get netenv ?

How to install

Basics

First time configuration

Configuration

Examples

Remarks at DNS

Remarks for SuSe 7.3 Users

netenv alternatives

Conclusion


Where to get netenv ?

Netenv has a homepage at Sourceforge: http://netenv.sourceforge.net

But you may know this already ...

You will find there the tar-file as well as the RedHat-RPM. The latter should be useable in Mandrake and Suse too.

Debian-User

Netenv has been available for Debian quite a while. Look at http://www.debian.org/distrib/packages.

Back to Table of Contents

How to Install

It depends ... For all distributions, which use RPM, do as root e.g.:
rpm -i netenv-0.94-1.i386.rpm
In Debian e.g.:
dpkg -i netenv-0.92-2.i386.deb
In all other cases:
tar xvf netenv-0.94-2.tar
This installs a shellscript called netenv, a little helper utility trpnc, configuration examples and these docs. Depending on the distribution a little handwork may be necessary.

RedHat

I don't know anything about current RedHat versions. Therefore the following hints are probably out of date. You may find useful hints in the section
How to use the tar-file

The netenv-RPM has been packaged under RedHat 6.1. So it should be possible to install in all distributions using RPM.

The postinstall-script puts

/etc/rc.d/rc.sysinit now looks like this:
lulu:/home/bav> tail -2 /etc/rc.d/rc.sysinit
# Added by package netenv on 06.03.2000 19:53:10
/usr/sbin/netenv
Additionally /etc/sysconfig/network-scripts/ifcfg-eth0 will be changed. Just after first installing Redhat this file looks like:
lulu:/etc/sysconfig/network-scripts>>> cat ifcfg-eth0 
DEVICE=eth0
BROADCAST=192.168.200.255
IPADDR=192.168.200.201
NETMASK=255.255.255.0
NETWORK=192.168.200.0
ONBOOT=yes
Installing netenv adds two lines:
lulu:/etc/sysconfig/network-scripts>>> tail -3 ifcfg-eth0
ONBOOT=yes
# Added by package netenv on 06.03.2000 19:53:10
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi

SuSe

With Suse 8.x a couple of changes in system boot and network configuration were introduced. The current procedure assumes Suse 8.1, but it should work with 8.0 as well. For older versions see the next paragraph.

SuSe 8.1

The postinstall-script adds two lines to /etc/init.d/boot.local:
lulu:/etc/init.d> tail -3 boot.local
#
# Added by package netenv on 06.12.2002 10:45:10
/usr/sbin/netenv
This way netenv is called during boot. netenv assumes the NIC to be configured is eth0, so the line
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
is appended to the file
/etc/sysconfig/network/ifcfg-eth0
It then looks like:
lulu:/etc/sysconfig/network> cat ifcfg-eth0
FIREWALL="YES"
BOOTPROTO='static'
BROADCAST='nn.nn.nn.nn'
IPADDR='nn.nn.nn.nn'
NETMASK='nn.nn.nn.nn'
NETWORK='nn.nn.nn.nn'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='oxTw.yHaVEFCrUXE'
WIRELESS='no'
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
The entries IPADDR, NETMASK etc. spring from the basic installation. There is no need to delete them as they are superseded by the assignments in /tmp/netenv. In this example I assume that the NIC is not a PCMCIA-NIC. Otherwise the line
STARTMODE='onboot'
must read
STARTMODE='hotplug'

SuSe 7.3

The postinstall-script adds two lines to /etc/rc.d/boot.local:
mweb@guru:/etc/rc.d > tail -3 boot.local 
# before we're going to the first run level.
#
# Added by package netenv on 06.02.2001 20:28:10
/usr/sbin/netenv
For PCMCIA-Cards an entry in /etc/pcmcia/network.opts is done:
mweb@guru:/etc/pcmcia > tail -2 network.opts 
esac
# Added by package netenv on 06.02.2001 20:28:10
if [ -r /tmp/netenv ]; then . /tmp/netenv; fi
If the laptop has a builtin NIC and PCMCIA must not be used, you may override the values defined by YAST as follows:
mweb@guru:/etc/rc.d > head -16 network 
#! /bin/sh
# Copyright (c) 1996 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# Author: Florian La Roche , 1996
#       Werner Fink , 1996
#       Burchard Steinbild , 1996
#       Rolf Haberrecker , 1998
#       Werner Fink  (based on a patch of Andries Brouwer) 1999
#
# /sbin/init.d/network
#

. /etc/rc.status
. /etc/rc.config
if [ -r /tmp/netenv ] ; then . /tmp/netenv; fi

Debian

The Debian-Package netenv is currently worked on. As far as I know, PCMCIA-NIC's can be used without further configuration.

Onboard-NIC's though need a changed /etc/network/interfaces. You can do this using netenv procedures, see the example script netenv_setup_debian_example. If you do nothing, your NIC will be configured like it was during system installation regardless what you choose with netenv.

Mandrake

Mandrake 9 users reported that the splash-screen had to be disabled (disable vga=nnn in /etc/lilo.conf) in order to be able to input something during boot. Furthermore the cdialog seems not to be stable. Problems could be solved only after using the SuSE dialog binary instead.

How to use the tar-file

These are the necessary steps:
tar zxvf netenv-0.94-2.tar.gz
cd netenv-0.94-2
make
make install # must be user root from now on !
make config
Depending on the distribution the last step make config may eventually have to be done manually.

netenv must be called before the normal network- or PCMCIA-start. Check for /etc/init.d/boot.local or the equivalent. See the SuSE 8.1 paragraph for further details.

After you have ensured that netenv is called during boot, the configuration data must be read by the network scripts. Modern distributions seem to use ifup to start a preconfigured net interface. Then the SuSE 8.1 paragraph should contain the details.

A common issue is to confuse eth0 and eth1 if there is an onboard NIC and a PCMCIA NIC. Chances are that eth0 is the onboard and eth1 is the PCMCIA NIC. Verify with dmesg | grep eth and lspci.

Netenv checks for eth1, but depending on the configuration at the time of installation this cannot be waterproof.

Back to Table of Contents

Basics

The basic idea is to enter information about the current location of the laptop in a very early phase of booting. This happens before configuring any network interface.

This is done using dialog(1), a simple menu interface, well known to most users. Booting is continued after the user has done his selection. For a default environment this may be as simple as just pressing RETURN.

If "lilo" is used as bootmanager, you may alternatively input after the lilo-prompt:

linux NETENV=office
This defines a shell variable "NETENV" with the value "office". This means for me: I am with my laptop named lulu in the office. The file containing the values for IP-address etc. is /etc/netenv/lulu-lavie. The Linuxkernel starts the init-process with the variable NETENV as part of its environment. The same does init with the so called rc-scripts.

The netenv-script tests for NETENV beeing defined. If it is, netenv carries out further actions without popping up the manu.

After having selected the current environment, netenv copies the actual file to /tmp/netenv.

This file has modes 644, so being readable by any user for further user dependent configuration tasks.

Back to Table of Contents

First time configuration

After installing the user root should call netenv. Do simply:
netenv
This will fire up a menu with only one choice:
    new  Set_up_new_environment  
These parameters will be asked for:
   Enter the current IP-Address or the keyword dhcp ...
   Enter the netmask of the current subnet ...
   Enter the IP-Address of the current network ...
   Enter the Broadcast-Address of the current network ...
   Enter the Gateway-Address of the current network ...  
   Enter the IP-address of the current nameserver ...  
If in a network with DHCP-Server, input dhcp instead of an IP-Address. Then a /tmp/netenv is generated containing only
BOOTPROTO='dhcp'
STARTMODE='hotplug'
All other values will be derived according to the DHCP-configuration. If the NIC is onboard, netenv should have written
STARTMODE='onboot'
In case of a static IP-address there will be a default entry for the other items, which will be sufficient in many situations.

Finally you will be asked if you want to save this configuration for further use:

    Do you want to save this configuration ?
Please do not use spaces in this name !

Depending on the Distribution netenv offers to restart the network and to activate the changes this way.

If this is not applicable, take out your PCMCIA-NIC (if it's PCMCIA you use ...) and stick it in again (cardmgr will ring the bell). The same result may be achieved doing

/etc/init.d/pcmcia restart
In any case cardmanager from the PCMCIA-package should configure the interface.

Ping your gateway-address and you will know !

Didn't work ? Is the link-LED green ? Check the output of

ifconfig eth0

The procedure just described may be also be used, wenn you want to switch from one network environment to another while your laptop stays up and running. There is no need to reboot - it's Linux ...

Those, who use a NIC onboard instead of a PCMCIA-NIC have to restart their network.

In RedHat or SuSE e.g.:

/etc/init.d/network restart
Netenv does this according to your input.

Back to Table of Contents

Configuration

Netenv is configured using files. You will find them in /etc/netenv. On a laptop named "lulu" files lulu, lulu-foo, lulu-bar etc. will be used. So the naming scheme is as follows:
/etc/netenv/<NODE-NAME>-<VALUE-OF-VARIABLE-NETENV>
The filename identical to the laptop's hostname is the first item in the selection menu. You simply may press RETURN and booting is continued. You should put the most frequently used environment into this file.

All files contain assignments in shell syntax, e.g.

netenv_id=At_Home_LCD_WheelMouse_pcmcia
...
IPADDR=123.456.78.9
...
NETSCAPE_PROXY_TYPE=2
Spaces will cause trouble. For a well configured NIC you will have to define at least
IPADDR
NETMASK
NETWORK
BROADCAST
Depending on the situation you may additionally have to define
GATEWAY
DNS_1
You may stick any variableassignment into the file - as long as everything is syntactically right. There is something special with an assignment like
NETENV_SCRIPT=/etc/netenv/netenv_setup
If the file pointed to is readable, netenv will execute this file (to be precise: it will source it) after the current network environment has been choosen.

Pay Attention ! This will be in a very early stage of boot. No network will be active ! NETENV_SCRIPT will be executed with root privileges !

With the help of this script you may do quite useful things. More on this in the example section.

Expert Mode

If you choose CANCEL in the netenv-dialog-box, you may enter a shell. After quitting this, the chooserbox pops up again. Security hints: The directory /etc/netenv and the files in it must be writeable only for root. netenv does some basic checks for this.

Back to Table of Contents

Examples

Of course this is the most important part of this documentation ...

The examples are described step by step. So please read them one after the other !

StandAlone_Touchpad

lulu:/etc/netenv>>> cat lulu-touch-pad 
netenv_id=StandAlone_Touchpad_no_eth
STARTMODE=manual
export XF86CONFIG_FILE=/etc/X11/XF86Config-4-lcd-touch
NETENV_SCRIPT=/etc/netenv/netenv_setup
# This may be used to edit ~/.netscape/preferences.js
NETSCAPE_PROXY_TYPE=3
I use this one when my laptop has no network connection.

The value of the variable netenv_id (as I said earlier: Please without spaces) will be used as decription in the chooser box.

There is no IP-address defined. By setting STARTMODE=manual there will no NIC be configured during boot. I assign NETENV_SCRIPT=/etc/netenv/netenv_setup. This is a file containing shell commands. It is attached to this documentation here.

This sample is written in a simple manner to get you started. Relevant code section here is:

lulu:/etc/netenv>>> cat netenv_setup
...
# Simple way to configure the X-Server 
if [ -r $XF86CONFIG_FILE ]; then
    echo $XF86CONFIG_FILE will be used for configuring the X-Server ...
    mv /etc/X11/XF86Config /etc/X11/XF86Config.old
    ln -s $XF86CONFIG_FILE /etc/X11/XF86Config
fi
fi
...
As I defined XF86CONFIG_FILE the code creates a link. Right now it is pointing to the configuration file, which I created for my laptop with touchpad.

Typically netenv_setup does everything the root user is needed for and the whole system is concerned with. Personal settings are done via .xinitrc. Here is an example:

In my private configuration I use NETSCAPE_PROXY_TYPE:

lulu:/home/bav> cat .xinitrc
#!/bin/sh
...
if [ -r /tmp/netenv ]; then
. /tmp/netenv
fi
if [ -n "$NETSCAPE_PROXY_TYPE" ]; then
   ~/tools/edit-ns-preferences $NETSCAPE_PROXY_TYPE
fi
...
You will find the script edit-ns-preferences in the netenv-documentation. It will avoid nasty network-timeouts, when starting the browser.

In_the_Office

lulu:/etc/netenv>>> cat lulu-lavie
# Networkenvironment: netask
netenv_id="lavie_pcmcia_dhcp"
export BOOTPROTO=dhcp
export STARTMODE=hotplug
export PRINTER=cc_hp
NETSCAPE_PROXY_TYPE=2
FETCHMAIL_POLL_INTERVALL=900
In the office I get my network configuration from a DHCP-Server. STARTMODE=hotplug is set, because my laptop has no onboard-NIC and therefore the PCMCIA-NIC has to be used.

PRINTER=cc_hp sets the defaultprinter to the printer in the office. NETSCAPE_PROXY_TYPE=2 activates automatic proxyconfiguration in Netscape.

When I am in the office, mail shall be fetched periodically. For this I use FETCHMAIL_POLL_INTERVALL. The following snippet from my ~/.xinitrc starts fetchmail as daemon, which will became active every 15 min and carry out things defined in ~/.fetchmailrc:

if [ -n "$FETCHMAIL_POLL_INTERVALL" ]; then 
   fetchmail -d $FETCHMAIL_POLL_INTERVALL
fi

Laptop_at_home

At home I use my default configuration file. As I work here most of the time the filename equals my laptops node name. So I just have to press return in the netenv-chooser-box:
netenv_id=At_Home_Docking_LCD_WheelMouse_onboard_VPN
IPADDR=nnn.nn.nnn.nnn
NETMASK=nnn.nnn.nnn.nnn
NETWORK=nnn.nn.nnn.nnn
BROADCAST=nnn.nn.nnn.nnn
GATEWAY=nnn.nn.nnn.nnn
SEARCH=foo.bar.com
DNS_1=nnn.nn.nn.nn
DNS_2=nnn.nn.nn.nn

FETCHMAIL_POLL_INTERVALL=900

# If the variable NETENV_SCRIPT points to an readable file,
# it will be run when netenv is executed
NETENV_SCRIPT=/etc/netenv/netenv_setup
ICEWM_INCLUDE_FILE=home
# This defines my CRT with 1024x768 and a wheelmouse
XF86CONFIG_FILE=/etc/X11/XF86Config-4-lcd-wheel
# This may be used to edit ~/.netscape/preferences.js
NETSCAPE_PROXY_TYPE=2
# This may be used to edit ~/.opera/opera6.ini
OPERA_PROXY_FILE=proxy-fsc.ini

# NIC is in the docking unit - like it were onboard
STARTMODE='onboot'
Relevant portion from my netenv_setup is this:
lulu:/etc/netenv>>> cat netenv_setup
...
PROFILE=$1
...
if [ "$PROFILE" = "default" ]; then
   print_action linking /dev/pilot
   rm -f /dev/pilot; ln -s /dev/ttyS0 /dev/pilot
   print_status
   print_action calling ptal-init start
   /usr/sbin/ptal-init start 
   print_status
else
   # When there is no docking station, start irattach appropiately and
   # link /dev/pilot to ircomm0.
   print_action running irattach
   /usr/sbin/irattach /dev/ttyS3 -s
   print_status
   print_status linking /dev/pilot
   rm -f /dev/pilot; ln -s /dev/ircomm0 /dev/pilot
   print_status
fi
...
netenv_setup is called with the parameter PROFILE, which equals "default" here (in all other cases it is the filename of the descriptionfile minus hostname portion).

At home I use a cradle for my palm. So /dev/pilot must point to the appropriate serial device. Additionally the software for my HP Officejet has to be started. In all other environments the palm can be reached only via IRDA. ptal must not be started then.

At home my laptop is in a docking-unit. This has a NIC. In order to use this NIC

STARTMODE='onboot'
has to be set.

At_Customer_Foobar

Earlier versions of libc made it possible for a non privileged user to make kind of private /etc/hosts by setting the environment variable HOSTALIASES. Due to security issues this is no longer possible in recent versions of libc.

If you don't like to edit your /etc/hosts manually, the following idea may help. For me it is useful, as I find computers with identical names but different IP-addresses in different environments.

I put marks in my /etc/hosts like this:

lulu:/home/bav> cat /etc/hosts
...
# netenv hosts begin
# netenv hosts end
...
Now I define nodes with their IP-addresses, which I want to connect to in the current environments:
NETENV_HOST_ENTRIES="192.168.10.11 abba:192.168.10.12 bebe:192.168.10.3  alfa-sw:\
192.168.10.4  beta-sw:192.168.10.13 coca:192.168.10.14 cola"
This code in my /etc/netenv/netenv_setup will care for editing /etc/hosts after choosing the environment:
if [ -n "$NETENV_HOST_ENTRIES" ]; then
   if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then
      (
      awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts
      echo $NETENV_HOST_ENTRIES | awk -F'\:' '{ for ( j=1; j<=NF; j++ ) print $j }'
      awk '/^# netenv hosts end$/,/*/' /etc/hosts
      ) > /etc/hosts.netenv
      mv /etc/hosts.netenv /etc/hosts
      chmod 644 /etc/hosts
      echo netenv_setup: /etc/hosts was modified ...
   fi
else
   if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then
      (
      awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts
      awk '/^# netenv hosts end$/,/*/' /etc/hosts
      ) > /etc/hosts.netenv
      mv /etc/hosts.netenv /etc/hosts
      chmod 644 /etc/hosts
      echo netenv_setup: /etc/hosts was cleaned up ...
   fi
fi
Now /etc/hosts looks like this:
...
# netenv hosts begin
192.168.10.11 abba
192.168.10.12 bebe
192.168.10.3 alfa-sw
192.168.10.4 beta-sw
192.168.10.13 coca
192.168.10.14 cola
# netenv hosts end
...
All these nodes are trusted, so I use the mechanism in my ~/.xinitrc and call xhost appropriate:
XHOST_PLUS_LISTE=`awk '/^# netenv hosts begin$/,/^# netenv hosts end$/' /etc/hosts | awk '!/^#/ {print $2}'`
xhost $XHOST_PLUS_LISTE
xhost gives me:
lulu:/home/bav> xhost 
access control enabled, only authorized clients can connect
INET:cola
INET:coca
INET:beta-sw
INET:alfa-sw
INET:bebe
INET:abba

Back to Table of Contents

Remarks concerning DNS

Netenv does no DNS configuration. Unfortunately there are a couple of differences in this area looking at the distributions.

I always felt the mechanism, which David Hinds implemented in his PCMCIA-package, being sufficient (Script network). This snippet shows what is happening there:

        # Update DNS stuff
        cp /etc/resolv.conf /etc/resolv.new
        echo "# $DEVICE begin" >> /etc/resolv.new
        test "$DOMAIN" && echo "domain $DOMAIN" >> /etc/resolv.new
        if [ "$DNSSRVS $DNS_1 $DNS_2 $DNS_3" != "   " ] ; then
            for DNS in $DNSSRVS $DNS_1 $DNS_2 $DNS_3 ; do
                echo "nameserver $DNS" >> /etc/resolv.new
            done
        fi
        echo "# $DEVICE end" >> /etc/resolv.new
        mv /etc/resolv.new /etc/resolv.conf
The file /etc/resolv.conf is copied to a temporary file. If one of the variables DOMAIN, DNSSRVS, DNS_1, DNS_2 or DNS_3 are defined, appropiate commands are issued. This new section starts e.g. with # eth0 begin and ends with e.g # eth0 end. These makes are used, to clear the section, when PCMCIA is shut down. Afterwards /etc/resolv.conf will be in the original state.

So defining e.g. DNS_1 makes this thing work.

If you want to use netenv for this task, you may put following code in /etc/netenv/netenv_setup:

if [ ! -z "$DNS_1" ]; then 
    (
    echo "# resolv.conf autogenerated by netenv "`date`
    if [ ! -z "$DOMAIN" ]; then echo domain $DOMAIN; fi
    if [ ! -z "$SEARCH" ]; then echo search $SEARCH; fi
    echo nameserver $DNS_1
    if [ ! -z "$DNS_2" ]; then echo nameserver $DNS_2; fi
    ) > /etc/resolv.conf
    chmod 644 /etc/resolv.conf
    echo netenv: /etc/resolv.conf was set up ...
fi

Back to Table of Contents

Remarks for SuSe 7.3 Users

If you have an onboard-NIC (so that there is no need to use a PCMCIA-NIC), you have to override the standard entry in /etc/rc.config. You can do this by setting IFCONFIG_0:
IFCONFIG_0="172.25.64.130 broadcast 172.25.64.255 netmask 255.255.255.0 up"
If you want to use DHCP, the entry must read
IFCONFIG_0="dhcpclient"
Using netenv you may do this as follows:

At first the appropriate profile:

elli:/etc/netenv> cat elli-ht
# Networkenvironment: DHCP
export USE_DHCP=yes
NETENV_SCRIPT=/etc/netenv/netenv_setup
Furthermore you need a netenv_setup script with at least following contents:
elli:/etc/netenv> cat netenv_setup
edit_rc_config()
{
   if [ ! -r /etc/rc.config ]; then
      echo No /etc/rc.config, probably not a SuSE-System, giving up ...
      return 1
   fi
   VARIABLE_TO_CHANGE=$1
   shift
   echo ${VARIABLE_TO_CHANGE}'="'$*'"' > /tmp/.netenv.tmp.$$
   LINE=`awk '/^'$VARIABLE_TO_CHANGE'=/ {LINE=NR} END {print LINE}' /etc/rc.config`
   awk -v LINE=$LINE 'NR /tmp/.rc.config.netenv
   cat /tmp/.netenv.tmp.$$ >> /tmp/.rc.config.netenv
   awk -v LINE=$LINE 'NR>LINE' /etc/rc.config >> /tmp/.rc.config.netenv
   cat /tmp/.rc.config.netenv > /etc/rc.config
   rm -f /tmp/.rc.config.netenv /tmp/.netenv.tmp.$$
   echo netenv_setup: rc.config edited, Variable $VARIABLE_TO_CHANGE set to $*
}
if [ "$USE_DHCP" = yes ]; then
   edit_rc_config IFCONFIG_0 dhcpclient
else
   edit_rc_config IFCONFIG_0 "$IPADDR broadcast $BROADCAST netmask $NETMASK up"
fi

SuSe uses the files /etc/route.conf for describing static routing. The default-route looks like this:

default                 172.246.2.1
Using the example where netenv edits /etc/hosts you may use e.g.:
if grep SuSE /etc/issue 1>/dev/null; then
   if [ ! -z "$GATEWAY" ]; then
    (
    echo "# route.conf autogenerated by netenv "`date`
    echo default $GATEWAY 0.0.0.0 eth0
    ) > /etc/route.conf
    echo netenv_setup: /etc/route.conf was modified ...
   fi
fi
Back to Table of Contents

netenv Alternatives

As frequently in Linux there are other choices. Read Linux on the Road - A Guide for Laptops and Mobile Devices by Werner Heuser to find alternative solutions.

Those I had a closer look at, try to find out the network environment by sending arp requests. SuSe recently came up with System Configuration Profile Management scpm, which is quite powerful but lacks an user interface during boot which I feel to be important.

Back to Table of Contents

Conclusion

I hope netenv will be useful for you. Do not hesitate to send questions and comments to bav@epost.de.

Back to Table of Contents


Gerd Bavendiek
Last modified: Tue Apr 1 20:55:37 CEST 2003 netenv-0.94.3/doc/netenv_setup0100744000175000017500000000637007633444036015322 0ustar frankfrank#!/bin/sh #****************************************************************** #ident /etc/netenv/netenv_setup Time-stamp: <03/03/11 21:33:34 bav> #****************************************************************** # Gerd Bavendiek bav@epost.de 98-04-17 # # If there is a variable NETENV_SCRIPT pointing to this executable # file, netenv will source this script during boot. The following is # what makes sense for me. Take it as a starting point. # # Let op: This will be run as root ! #------------------------------------------------------------------ ###set -x #--- Some functions ------------------------------------------- print_action() { echo -e netenv: $* " ... \c" } print_status() { if [ $? -eq 0 ]; then echo done else echo failed fi } #--- End of functions ----------------------------------------- #--- Do everything needed when working at home ---------------- PROFILE=$1 print_action Using PROFILE $PROFILE echo if [ "$PROFILE" = "default" ]; then print_action linking /dev/pilot rm -f /dev/pilot; ln -s /dev/ttyS0 /dev/pilot print_status print_action calling ptal-init start /usr/sbin/ptal-init start print_status else # When there is no docking station, start irattach appropiately and # link /dev/pilot to ircomm0. print_action running irattach /usr/sbin/irattach /dev/ttyS3 -s print_status print_status linking /dev/pilot rm -f /dev/pilot; ln -s /dev/ircomm0 /dev/pilot print_status fi #--- Set defaultgateway --------------------------------------- if [ ! -z "$GATEWAY" ]; then print_action Defaultgateway setting to $GATEWAY, see /etc/sysconfig/network/routes ( echo "# routs autogenerated by netenv "`date` echo "default $GATEWAY - -" ) > /etc/sysconfig/network/routes print_status done fi #--- Set up /etc/resolv.conf ---------------------------------- if [ ! -z "$DNS_1" ]; then rm -f /etc/resolv.conf ( echo "# resolv.conf autogenerated by netenv "`date` if [ ! -z "$DOMAIN" ]; then echo domain $DOMAIN; fi if [ ! -z "$SEARCH" ]; then echo search $SEARCH; fi echo nameserver $DNS_1 if [ ! -z "$DNS_2" ]; then echo nameserver $DNS_2; fi ) > /etc/resolv.conf.netenv chmod 644 /etc/resolv.conf.netenv print_action setting up new /etc/resolv.conf ln -s /etc/resolv.conf.netenv /etc/resolv.conf print_status fi #--- Edit /etc/hosts ------------------------------------------- if [ -n "$NETENV_HOST_ENTRIES" ]; then if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then ( awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts echo $NETENV_HOST_ENTRIES | awk -F':' '{ for ( j=1; j<=NF; j++ ) print $j }' awk '/^# netenv hosts end$/,/*/' /etc/hosts ) > /etc/hosts.netenv print_action modifying /etc/hosts mv -f /etc/hosts.netenv /etc/hosts chmod 644 /etc/hosts print_status fi else if egrep '^# netenv hosts begin$' /etc/hosts > /dev/null 2>&1; then ( awk 'NR==1,/^# netenv hosts begin$/' /etc/hosts awk '/^# netenv hosts end$/,/*/' /etc/hosts ) > /etc/hosts.netenv print_action cleaning up /etc/hosts mv -f /etc/hosts.netenv /etc/hosts chmod 644 /etc/hosts print_status fi fi netenv-0.94.3/Makefile0100600000175000017500000000147707740324104013535 0ustar frankfrankVERSION="0.94-3" FILES=netenv math.c Makefile netenv.spec config_netenv DOC_FILES=README doc trpnc: math.c cc -o trpnc math.c strip trpnc package: rm -rf netenv-$(VERSION) mkdir netenv-$(VERSION) cp -rp $(FILES) $(DOC_FILES) netenv-$(VERSION) tar zcvf netenv-$(VERSION).tar.gz netenv-$(VERSION) rpmpackage: tar zcvf netenv-$(VERSION).tar.gz $(FILES) $(DOC_FILES) install: install -p -o root -g root -m 744 netenv /usr/sbin install -p -o root -g root -m 755 trpnc /usr/bin install -p -o root -g root -m 755 -d /etc/netenv install -p -o root -g root -m 755 -d /usr/share/doc/packages/netenv install -p -o root -g root -m 644 doc/*.html doc/NEWS doc/lulu* doc/*png /usr/share/doc/packages/netenv install -p -o root -g root -m 744 doc/netenv_setup* doc/edit* /usr/share/doc/packages/netenv config: @./config_netenv netenv-0.94.3/math.c0100600000175000017500000000577206416643722013205 0ustar frankfrank#include #include #include #include /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */ /* The contents of this file were created by Bruce Perens . The contents of this file are copyright 1994, 1995, 1996 Bruce Perens. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA. */ const char math_usage[] = "math expression ..."; static double stack[100]; static unsigned int pointer; static void push(double a) { if ( pointer >= (sizeof(stack) / sizeof(*stack)) ) { fprintf(stderr, "math: stack overflow\n"); exit(-1); } else stack[pointer++] = a; } static double pop() { if ( pointer == 0 ) { fprintf(stderr, "math: stack underflow\n"); exit(-1); } return stack[--pointer]; } static void add() { push(pop() + pop()); } static void sub() { double subtrahend = pop(); push(pop() - subtrahend); } static void mul() { push(pop() * pop()); } static void divide() { double divisor = pop(); push(pop() / divisor); } static void and() { push((unsigned int)pop() & (unsigned int)pop()); } static void or() { push((unsigned int)pop() | (unsigned int)pop()); } static void eor() { push((unsigned int)pop() ^ (unsigned int)pop()); } static void not() { push(~(unsigned int)pop()); } static void print() { printf("%g\n", pop()); } struct op { const char * name; void (*function)(); }; static const struct op operators[] = { { "add", add }, { "and", and }, { "div", divide }, { "eor", eor }, { "mul", mul }, { "not", not }, { "or", or }, { "sub", sub }, { 0, 0 } }; static void stack_machine(const char * argument) { char * endPointer = 0; double d; const struct op * o = operators; if ( argument == 0 ) { print(); return; } d = strtod(argument, &endPointer); if ( endPointer != argument ) { push(d); return; } while ( o->name != 0 ) { if ( strcmp(o->name, argument) == 0 ) { (*(o->function))(); return; } o++; } fprintf(stderr, "math: %s: syntax error.\n", argument); exit(-1); } void usage(const char * message) { if ( message == 0 || *message == 0 ) return; fprintf(stderr, "Usage:\t%s\n", message); } int main(int argc, char * * argv) { if ( argc - 1 < 1 || (argc >= 2 && strcmp(argv[1], "--help") == 0 ) ) { usage(math_usage); return 1; } while ( argc >= 2 ) { stack_machine(argv[1]); argv++; argc--; } stack_machine(0); return 0; } netenv-0.94.3/netenv0100755000175000017500000003051307712267552013337 0ustar frankfrank#!/bin/bash #****************************************************************** #$ident: @(#) netenv 0.94 Time-stamp: <03/07/31 21:35:06 bav> $ #****************************************************************** # Gerd Bavendiek bav@epost.de 97-05-00 # # This script is used to set up a file containing information about # the actual network environment. This can be esp. useful for a # laptop being used in multiple environments: at home, in the office, # at a customer site. # # After the comment section has become quite large, I swapped it to a # netenv.html file. # # netenv will fail when there is no dialog(1) or gdialog found ! # # As of version 0.81 netenv will try to use "math" when setting up a # new environment. math is work of Bruce Perens . To # avoid conflicts with e.g. Mathematica it has been renamed to trpnc. #------------------------------------------------------------------- NETENV_VERSION="0.94" # Security check NO_NOT_BY_ROOT_OWNED_FILES=`find /etc/netenv ! -user 0 | wc -l | awk '{print $1}'` NO_GROUP_WRITABLE_FILES=`find /etc/netenv -type f -perm -060 | wc -l | awk '{print $1}'` NO_WORLD_WRITABLE_FILES=`find /etc/netenv -type f -perm -006 | wc -l | awk '{print $1}'` if [ $NO_NOT_BY_ROOT_OWNED_FILES != "0" -o $NO_GROUP_WRITABLE_FILES != "0" -o $NO_WORLD_WRITABLE_FILES != "0" ]; then echo netenv: Security check failed, fix permissions in /etc/netenv ! echo NO_NOT_BY_ROOT_OWNED_FILES=$NO_NOT_BY_ROOT_OWNED_FILES NO_GROUP_WRITABLE_FILES=$NO_GROUP_WRITABLE_FILES NO_WORLD_WRITABLE_FILES=$NO_WORLD_WRITABLE_FILES exit 1 fi ###set -x # When located in /tmp, script must be called # AFTER wiping out /tmp has been done ... NETENV_FIL=`tempfile -n /tmp/netenv 2>/dev/null` # At least older Debian system don't know tempfile; the following # statement should deal with this situation if [ $? -ne 0 ]; then NETENV_FIL=/tmp/netenv; fi NETENV_BASE=/etc/netenv COLS=68 TMPFIL=`tempfile -d /tmp -p dialo > /dev/null 2>&1` if [ $? -ne 0 ]; then TMPFIL=/tmp/netenv.tmp.$$; fi MATH=/usr/bin/trpnc # Needed only when setting up a new environment, see # function get_netenvdata() ###TERM=linux; export TERM # We are called from init, so we need to know # Some functions ... DIALOG=gdialog if ! type gdialog > /dev/null 2>&1; then if ! type dialog > /dev/null 2>&1; then echo Neither gdialog nor dialog found, aborting ... echo Install packages gnome-utils or dialog to fix ! exit 1 fi DIALOG=dialog fi ExitOnCancel() { echo "You have canceled the setup routine. No Network \ configuration will be done !"; exit 1; } ExitOnError() { echo "An unknown error ocurred during setup. No Network \ configuration will be done !"; exit 1; } first() { echo $* | cut -f1 -d" "; } second() { echo $* | cut -f2 -d" "; } third() { echo $* | cut -f3 -d" "; } fourth() { echo $* | cut -f4 -d" "; } CheckReturnVal() { case $? in 0) ;; 1) ExitOnCancel;; *) ExitOnError;; esac } CheckNoInput() { if [ "$1" = "" ]; then echo "You did not respond with input. No Network \ configuration will be done !" exit 1 fi } get_netenvdata() { # Executable assigned by $MATH is being used. If it's not available, # don't panic, just a loss of convenience ... while true do $DIALOG --inputbox "IP-Address\nEnter the current IP-address or the keyword dhcp ..." \ 9 $COLS $IPADDR 2>$TMPFIL CheckReturnVal IPADDR=`cat $TMPFIL` case $IPADDR in [dD][hH][cC][pP]) # Maybe this is SuSE specific. RedHat / Debian users feedback appreciated ! BOOTPROTO='dhcp' # This is a rather crude attempt to distinguish between # onboard and PCMCIA-NIC's. STARTMODE='hotplug' # Default is PCMCIA-NIC # cardmgr is (hopefully) not running at this time, so if # there is a eth0, it must be onboard if dmesg | grep eth0 >/dev/null 2>&1; then STARTMODE='onboot'; fi ;; *) CheckNoInput $IPADDR ipa=`echo $IPADDR | sed 's/\./ /g'` I1=`first $ipa` I2=`second $ipa` I3=`third $ipa` I4=`fourth $ipa` # Just a wild guess ... NETMASK=255.255.255.0 $DIALOG --inputbox "Netmask\nEnter the netmask of the current subnet ..." \ 9 $COLS $NETMASK 2>$TMPFIL CheckReturnVal NETMASK=`cat $TMPFIL` CheckNoInput $NETMASK netm=`echo $NETMASK | sed 's/\./ /g'` N1=`first $netm` N2=`second $netm` N3=`third $netm` N4=`fourth $netm` R1=`$MATH $I1 $N1 and` R2=`$MATH $I2 $N2 and` R3=`$MATH $I3 $N3 and` R4="0" NETWORK="$R1.$R2.$R3.$R4" $DIALOG --inputbox "Network\nEnter the IP-Address of the current network ..." \ 9 $COLS $NETWORK 2>$TMPFIL CheckReturnVal NETWORK=`cat $TMPFIL` CheckNoInput $NETWORK R1=`$MATH $N1 not 255 and $I1 or` R2=`$MATH $N2 not 255 and $I2 or` R3=`$MATH $N3 not 255 and $I3 or` R4=`$MATH $N4 not 255 and $I4 or` BROADCAST="$R1.$R2.$R3.$R4" $DIALOG --inputbox "Broadcast\nEnter the broadcast-Address of the current network ..." \ 9 $COLS $BROADCAST 2>$TMPFIL CheckReturnVal BROADCAST=`cat $TMPFIL` CheckNoInput $BROADCAST R1=`$MATH $I1 $N1 and` R2=`$MATH $I2 $N2 and` R3=`$MATH $I3 $N3 and` GATEWAY="$R1.$R2.$R3.1" $DIALOG --inputbox "Gateway\nEnter the Gateway-Address of the current network ..." \ 9 $COLS $GATEWAY 2>$TMPFIL CheckReturnVal GATEWAY=`cat $TMPFIL` # Don't check for GATEWAY, no input simply means closed shop - # which may be useful. # As of 0.92 I remove PROFILE. It's confusing people ... # As of 0.92 add Nameserver. Comes in handy from time to # time. Useful only when GATEWAY is set. if [ -n "$GATEWAY" ]; then $DIALOG --inputbox "Nameserver\nEnter the IP-address of the current nameserver ..." \ 9 $COLS $GATEWAY 2>$TMPFIL CheckReturnVal DNS_1=`cat $TMPFIL` # Don't check for input - there may be no nameserver fi ;; esac ( echo "The current contents of your /tmp/netenv is as follows:" echo echo "# Networkenvironment: netask" if [ "$BOOTPROTO" = "dhcp" ] ; then echo export BOOTPROTO=$BOOTPROTO echo export STARTMODE=$STARTMODE else echo export IPADDR=$IPADDR echo export NETWORK=$NETWORK echo export NETMASK=$NETMASK echo export BROADCAST=$BROADCAST if [ ! -z "$GATEWAY" ]; then echo export GATEWAY=$GATEWAY fi if [ ! -z "$DNS_1" ]; then echo export DNS_1=$DNS_1 fi fi echo -e "\n\n\n\n\n" echo "Answer if that looks ok, otherwise " echo ) > $TMPFIL $DIALOG --yesno "`cat $TMPFIL`" 20 72 if [ $? -eq 0 ]; then ( echo "# Networkenvironment: netask" if [ "$BOOTPROTO" = "dhcp" ] ; then echo export BOOTPROTO=$BOOTPROTO echo export STARTMODE=$STARTMODE else echo export IPADDR=$IPADDR echo export NETWORK=$NETWORK echo export NETMASK=$NETMASK echo export BROADCAST=$BROADCAST if [ ! -z "$GATEWAY" ]; then echo export GATEWAY=$GATEWAY fi if [ ! -z "$DNS_1" ]; then echo export DNS_1=$DNS_1 fi fi ) > $NETENV_FIL rm -f $TMPFIL break else $DIALOG --yesno "Do you want to repeat the setup process ? " 5 72 if [ $? -eq 1 ]; then exit 1; fi fi done chmod 644 $NETENV_FIL $DIALOG --yesno "Do you want to save this configuration ?" 5 72 if [ $? -eq 0 ]; then $DIALOG --inputbox "Configuration name\nEnter the name under which\ the configuration should be stored ..." \ 9 $COLS 2>$TMPFIL CheckReturnVal NETENV=`cat $TMPFIL` CheckNoInput $NETENV NETCONF_FIL="$NETENV_BASE/"$NODE"-"$NETENV cp $NETENV_FIL $NETCONF_FIL # As of 0.92 omit -p (scripts clean /tmp) fi } # End Function get_confdata choose_network_environment() { ITEM_LIST="" # have to be reentrant as of 0.93 ... # The ls gives a list of files starting with the current node name, # excluding emacs backup files. The list starts with the default # and ends with ask. for i in `ls $NETENV_BASE/$NODE $NETENV_BASE/$NODE-*[0-9a-zA-Z]` do netenv_id="unknown" eval `grep netenv_id $i` SUFFIX=`basename $i | cut -d '-' -f2-` # Maybe something like lulu or foo-bar or lulu-no-eth or foo-bar-no-eth SUFFIX=`basename $i` if [ $SUFFIX != $NODE ]; then LENGTH=$((${#NODE}+1)) SUFFIX=${SUFFIX:$LENGTH} fi ITEM_LIST=$ITEM_LIST" "$SUFFIX" "$netenv_id done ITEM_LIST=$ITEM_LIST" "new" "Set_up_new_environment $DIALOG --menu "netenv $NETENV_VERSION on $NODE running `uname -s` `uname -r`\n\nChoose your current network-environment !" \ 20 $COLS 12 $ITEM_LIST 2>$TMPFIL } # End Function choose_network_environment # End of function defining # Let's do the work ... case $1 in '-h'|'--help'|'-?'|'help') echo Version $NETENV_VERSION echo Docs and examples in /usr/share/doc/packages/netenv echo Latest versions see http://netenv.sourceforge.net exit 0 ;; esac NODE=`uname -n` ###NODE=foo-bar # TODO # The following block will hopefully get us a valid NETENV. It is # skipped for those, who still prefer input at the boot prompt if [ -z "$NETENV" ]; then choose_network_environment if [ $? -ne 0 ]; then $DIALOG --yesno "Do you want to enter expert mode ? " 5 72 if [ $? -eq 0 ]; then /bin/sh choose_network_environment else echo "You didn't choose a network environment - good luck !" rm -f $TMPFIL exit 0 fi fi NETENV=`cat $TMPFIL` && rm -f $TMPFIL # Deal with special cases if [ "$NETENV" = new ]; then : elif [ "$NETENV" = $NODE ]; then NETENV="" echo "netenv: File $NETENV_BASE/$NODE will be used for setting up the network environment ..." else echo "netenv: File $NETENV_BASE/$NODE"-"$NETENV will be used for setting up the network environment ..." fi else # Continue here, if variable NETENV has been set up as boot argument echo "netenv: Using provided NETENV=$NETENV ..." fi # Define the file holding the current network-environment # configuration. Directory is $NETENV_BASE, filename is e.g. foo-off # for the current system named "foo" and the Variable NETENV=off # (Laptop "foo" used in the office). If NETENV has not been defined, # look for file , e.g. "foo". # Handle special case: ask for environment if [ "$NETENV" = new ]; then NETCONF_FIL="$NETENV_BASE/"$NODE"-"$NETENV if [ -r $NETCONF_FIL ]; then . $NETCONF_FIL fi get_netenvdata # At this point we assume to have a valid NETENV_FIL, eventually a # NETCONF_FIL too. The latter is not a must. If the user decided # not to store the data it may be a once-and-never-again environment. elif [ -z "$NETENV" ]; then # Variable NETENV has not been defined or assigned, probably on # home tower or something like that ... # This is the default ! NETCONF_FIL="$NETENV_BASE/"$NODE else NETCONF_FIL="$NETENV_BASE/"$NODE"-"$NETENV fi if [ -r $NETCONF_FIL ]; then cp $NETCONF_FIL $NETENV_FIL # As of 0.92 omit -p (scripts clean /tmp) chmod 644 $NETENV_FIL else echo "netenv: Using temporary configuration data ..." fi . $NETENV_FIL # If NETENV_SCRIPT has been defined, run it. Of course this is done as # root. There is no NIC configured yet ! if [ -r "$NETENV_SCRIPT" ]; then if [ -z "$NETENV" ]; then PROFILE=default else PROFILE=$NETENV fi echo "executing $NETENV_SCRIPT $PROFILE ..." . $NETENV_SCRIPT $PROFILE fi rm -f $TMPFIL # New as of 0.93. If netenv is not run during boot but on the fly, ask the user, if # he wants to restart the network if [ `tty` != /dev/console ]; then $DIALOG --yesno "Do you want to activate changes by restarting the network ? " 5 72 if [ $? -eq 0 ]; then if grep 'Red Hat' /etc/issue > /dev/null; then /etc/init.d/network restart elif grep SuSE /etc/issue > /dev/null; then /etc/init.d/network restart # As of SuSE 8.0 route has gone. Still here for 7.3 Users ... if [ -x /etc/init.d/route ]; then /etc/init.d/route restart; fi fi fi fi netenv-0.94.3/netenv.spec0100600000175000017500000000734307740326062014253 0ustar frankfrankSummary: A help for laptop users in different network environments Name: netenv Version: 0.94 Release: 3 Copyright: GPL Group: System Environment/Base Packager: Gerd Bavendiek Source: netenv-0.94-2.tar.gz Buildroot: /tmp/%{name}-root %description Do you use your laptop in different network environments ? At home ? In the office ? At a customers site ? If yes, the small package "netenv" might be useful for you. When booting your laptop it provides you with a simple interface from which you can choose the current network environment. If you are the first time in an environment, you can enter the basic data for later reuse. %prep %setup -c netenv %build make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_LOCALE" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/etc/netenv cp -p netenv $RPM_BUILD_ROOT/usr/sbin cp -p trpnc $RPM_BUILD_ROOT/usr/bin %files %doc README %doc doc/* /usr/sbin/netenv /usr/bin/trpnc %config /etc/netenv %pre if ! type gdialog > /dev/null 2>&1; then if ! type dialog > /dev/null 2>&1; then echo Neither gdialog nor dialog found, aborting installation ... echo Install packages gnome-utils or dialog to fix ! exit 1 fi fi %post if grep 'SuSE Linux' /etc/issue > /dev/null; then echo seems to be a SuSE ... if grep '^/usr/sbin/netenv' /etc/rc.d/boot.local > /dev/null; then echo Found a call to netenv in /etc/rc.d/boot.local ... else echo Installing call to netenv in /etc/rc.d/boot.local ... echo '# Added by package netenv on '`date '+%x %X'` >> /etc/rc.d/boot.local echo /usr/sbin/netenv >> /etc/rc.d/boot.local fi NETWORK_CONFIG_BASEDIR=/etc/sysconfig/network elif grep -i Red /etc/issue | grep -i Hat > /dev/null; then echo seems to be a Redhat ... if grep '^/usr/sbin/netenv' /etc/rc.d/rc.sysinit > /dev/null; then echo Found a call to netenv in /etc/rc.d/rc.sysinit ... else echo Installing call to netenv in /etc/rc.d/rc.sysinit ... echo '# Added by package netenv on '`date '+%x %X'` >> /etc/rc.d/rc.sysinit echo /usr/sbin/netenv >> /etc/rc.d/rc.sysinit fi NETWORK_CONFIG_BASEDIR=/etc/sysconfig/network-scripts else echo Neither SuSE nor RedHat - Please read the docs in /usr/share/doc/packages/netenv exit 1 fi # Check for multiple NIC's if dmesg | grep eth1 > /dev/null 2>&1; then echo according to dmesg you have two or more NICS echo netenv assumes eth0 to be active. Fix manually if this is wrong ! fi # Step 2 - Make the netenv-data (in /tmp/netenv) available to the # system's network configuration procedure if grep '. /tmp/netenv' $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 > /dev/null; then echo /tmp/netenv seems to be already sourced from $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 ... else echo Installing sourcing /tmp/netenv in $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 ... echo '# Added by package netenv on '`date '+%x %X'` >> $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 echo 'if [ -r /tmp/netenv ]; then . /tmp/netenv; fi' >> $NETWORK_CONFIG_BASEDIR/ifcfg-eth0 fi %clean rm -rf $RPM_BUILD_ROOT %changelog * Mon Oct 6 2003 Gerd Bavendiek 0.94-3 - Smarter grepping for Red Hat /etc/issue * Fri Aug 01 2003 Gerd Bavendiek - Minor cleanups, new rpm built * Mon Mar 10 2003 Gerd Bavendiek - New version 0.94 * Fri Sep 20 2002 Gerd Bavendiek - New version 0.93 * Sat Feb 10 2001 Gerd Bavendiek - Complete rewrite of the english manual * Wed Jan 22 2001 Gerd Bavendiek - Reworking docs + adding german manual - SuSe support * Wed Mar 1 2000 Gerd Bavendiek - Initial RPM-Package # Local Variables: # rcpbuf-todo: ("/r@scp:root@coca:/usr/src/redhat/SPECS") # End: netenv-0.94.3/README0100644000175000017500000000110307712146715012760 0ustar frankfrank#ident README.netenv Time-stamp: <03/07/31 10:05:33 bav> Version 0.94 Do you use your laptop in different network environments ? At home ? In the office ? At a customers site ? If yes, this small package might be useful for you. It is available not only as tarball, but also prepackaged in different flavours. All documentation is in the directory doc. You'll find all the details in netenv-en.html. Deutschsprachige ziehen vielleicht netenv-de.html vor. Look for news in NEWS. If you have any questions or comments, mail me at bav@epost.de http://netenv.sourceforge.net