netenv-0.94.3/config_netenv 0100700 0001750 0001750 00000003550 07740324305 014642 0 ustar frank frank #!/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/ 0040744 0001750 0001750 00000000000 07740324522 012646 5 ustar frank frank netenv-0.94.3/doc/index.html 0100644 0001750 0001750 00000007202 07740324522 014643 0 ustar frank frank
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:
- keyword dhcp may be used for new environments
- Docs rewritten
- Variables BOOTPROTO and STARTMODE introduced for ifup
- Examples adopted to current distributions using ifup
- Example netenv_setup_debian_example for Debian non PCMCIA-users
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/NEWS 0100644 0001750 0001750 00000001717 07712422500 013344 0 ustar frank frank Changes 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-lavie 0100644 0001750 0001750 00000000725 07633441140 014650 0 ustar frank frank # -*- 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/lulu 0100644 0001750 0001750 00000002206 07633444753 013563 0 ustar frank frank # -*- 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-preferences 0100744 0001750 0001750 00000003613 07241243643 016436 0 ustar frank frank #!/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_example 0100744 0001750 0001750 00000003436 07641762171 020341 0 ustar frank frank #!/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.png 0100644 0001750 0001750 00000012105 07633367657 017120 0 ustar frank frank PNG
IHDR _ PLTE JMJ(? H pHYs J K , }IDATxK۶Ezq|t%ݲ<H4 WCH'<'w/@+T
%mA K //B!B!B!||p,P8
C`(3Y_9⩨)p0P8
C`( M9fuڶM9i:K0#x}i?P(_@v즻48ß)/طw;E@%=m:p/|> Å30mlq,\>[2)RT9Lw/ԶיT渤̘8S_zp[2)+|٠#U24:cOѝ?Z]Rd#\*ףYWx$Β$YYɊ_4J3$\Ä`>OyY1SCsxTxrx"ů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).+:Õg7SxWo=fZ36{4M3q/uN?մ39h\4}i]4Τ
X>$YRBXT^<̟[BrjLcKo4barf+EF- p0P8
N=ݛ[.A`v,5N3v,|AŇnuW3Eul5idVk4U5g@
Vg.1@Rx]K~hs= 0~%!npx'fw;Ľ{bjag~j:`O<@e>
CdhO3I2mYo!>fdۂkߍ.&v:
zGv5]mc:"B"%+N7.RIŎkߥǣ{.܌ӜܹtQt*pQ"ŶкagN}.9ӜܹR:kJ(\w~xGИ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$ZeoǜmC GwA`(́P8G?Rvhxf[]ߣ|g' ۧeG>dC7NtpS}AjVXس*ۮ^|H3
IJ{K{]fgd>ͼ