Compare commits
No commits in common. "v963" and "v961" have entirely different histories.
@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
||||
#dieses Framework wird im CVS Repository
|
||||
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
|
||||
#
|
||||
#Lage dieser Datei im Archiv: $Source$
|
||||
#
|
||||
#(c) 2003 Harald Kueller, Germany
|
||||
#This program is free software; you can redistribute it and/or
|
||||
#modify ist under the terms of the GNU General Public License
|
||||
#as published by the Free Software Foundation; either version
|
||||
#2 of the License, or (at your option) any later version.
|
||||
#
|
||||
#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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#InitScript zum Start des Daemons:
|
||||
#
|
||||
#Letzte Änderung von: $Author: kueller $
|
||||
#Datum der letzten Änderung: $Date: 2009-04-27 13:14:47 +0200 (Mo, 27 Apr 2009) $
|
||||
#Version der Datei: $Revision: 4633 $
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.7 2007/04/28 20:13:35 kueller
|
||||
#Entspricht eigentlich wieder der Version 1.5 -> Rev. 1.6 war ein
|
||||
#Fehlerhafter checkin eines Files fuer /etc/sysconfig/profile.d,
|
||||
#nicht fuer /etc/init.d
|
||||
#
|
||||
#Revision 1.5 2007/04/13 09:22:39 kueller
|
||||
#Anpassung des startup -> Dbus wird nun mit systemweiter Konfiguration gestartet
|
||||
#neue postinstall installiert den in der neuen version erwarteten user messagebus
|
||||
#
|
||||
#Revision 1.4 2007/04/12 10:01:17 kueller
|
||||
#Startup fehler wegen vorhandenem /var/run/dbus/pid nach
|
||||
#system absturz wird nun aufgefangen
|
||||
#
|
||||
#Revision 1.3 2007/02/18 08:59:04 kueller
|
||||
#PATH erweitert, so das dbus-launch, sowie die zugehoerigen daemons gefunden
|
||||
#werden.
|
||||
#
|
||||
#Revision 1.2 2006/07/18 13:26:27 kueller
|
||||
#Aufgrund neuer configure optionen (sysstatedir) ist /var/run/dbus nun ein
|
||||
#verzeichniss. initscript entsprechend geaendert. Ausserdem wird mehrmaliges
|
||||
#aufrufen mit "stop" option jetzt abgefangen
|
||||
#
|
||||
#Revision 1.1.1.1 2006/07/18 12:54:21 kueller
|
||||
#Startup Script fuer dbus
|
||||
#
|
||||
#
|
||||
|
||||
source /etc/init.d/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f /var/run/dbus/pid ]; then
|
||||
if [ "`pgrep dbus-daemon`" == "`cat /var/run/dbus/pid`" ]; then
|
||||
echo "The dbus deamon is already running with pid `cat /var/run/dbus/pid`"
|
||||
exit 10
|
||||
else
|
||||
rm /var/run/dbus/*
|
||||
fi
|
||||
fi
|
||||
export PATH=$PATH:/usr/X11R7/bin
|
||||
echo -n "Starting dbus messaging system"
|
||||
dbus-daemon --system
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
if [ ! -f /var/run/dbus/pid ]; then
|
||||
echo "dbus is not running!"
|
||||
exit 10
|
||||
fi
|
||||
echo -n "Stopping dbus messaging system"
|
||||
kill `cat /var/run/dbus/pid` &&
|
||||
rm /var/run/dbus/pid &&
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
@ -99,8 +99,34 @@ source /etc/init.d/functions
|
||||
case "$1" in
|
||||
start)
|
||||
for IF in `ls -d /sys/class/net/*[^lo]`; do
|
||||
DEVNAME=`basename $IF`
|
||||
/sbin/if_up $DEVNAME
|
||||
DEVNAME=`basename $IF`
|
||||
if [ -d /sys/class/net/$DEVNAME/wireless ]; then
|
||||
/sbin/wlan_setup $DEVNAME
|
||||
#give wlan a chance go create link
|
||||
sleep 1
|
||||
fi
|
||||
if [ -f /usr/sbin/ethtool ]; then
|
||||
#Einige Dumme Interfaces (z.B. die VMware Emulationen) Zeiten
|
||||
#den korrekten Status erst nach einem ifconfig up
|
||||
ifconfig $DEVNAME up
|
||||
WAITTIME=7
|
||||
ZAHLER=0
|
||||
while [ ${ZAHLER} -le ${WAITTIME} ]; do
|
||||
if [ ! `ethtool $DEVNAME|grep Link|awk '{print $3}'` == "yes" ]; then
|
||||
(( ZAHLER++ ))
|
||||
else
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ "`ethtool $DEVNAME|grep Link|awk '{print $3}'`" == "yes" ]; then
|
||||
/sbin/if_up $DEVNAME
|
||||
touch /var/run/net_up
|
||||
fi
|
||||
else
|
||||
/sbin/if_up $DEVNAME
|
||||
touch /var/run/net_up
|
||||
fi
|
||||
done
|
||||
if [ ! -f /var/run/net_up ] && [ -f /etc/nsswitch.default ]; then
|
||||
cp /etc/nsswitch.files /etc/nsswitch.conf
|
||||
|
@ -58,7 +58,7 @@ if [ -f /etc/sysconfig/kbd/setkeys ]; then
|
||||
fi
|
||||
exec 3>&-
|
||||
echo -n "Loading keymap..."
|
||||
/usr/bin/loadkeys -d >/dev/null
|
||||
/bin/loadkeys -d >/dev/null
|
||||
evaluate_retval
|
||||
|
||||
# End /etc/init.d/loadkeys
|
||||
|
@ -53,11 +53,6 @@ case "$1" in
|
||||
read <&3 MODULE OPTIONS
|
||||
while [ $MODULE ]; do
|
||||
echo -n "Loading Module $MODULE with options: $OPTIONS"
|
||||
if grep -q $MODULE /proc/modules; then
|
||||
echo -n "Module $MODULE already loaded - removing it"
|
||||
rmmod $MODULE
|
||||
evaluate_retval
|
||||
fi
|
||||
modprobe -s $MODULE $OPTIONS
|
||||
evaluate_retval
|
||||
read <&3 MODULE OPTIONS
|
||||
|
@ -28,6 +28,41 @@
|
||||
#Datum der letzten Änderung: $Date$
|
||||
#Version der Datei: $Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.8 2007/06/09 13:43:20 kueller
|
||||
#Erkennung ob / nfs ist, und sonderbehandlung fuer nfs boot eingebaut.
|
||||
#angepasst an zukuenftigen Viitor_netboot
|
||||
#
|
||||
#Revision 1.7 2007/04/30 18:05:04 kueller
|
||||
#Neue Udev initialisierung. Ist jetzt konform zur doku und funktioniert auch
|
||||
#
|
||||
#Revision 1.6 2007/04/28 19:59:58 kueller
|
||||
#an /dev muss vor dem start von udev ein tmpfs sein...
|
||||
#
|
||||
#Revision 1.5 2006/07/07 20:36:18 kueller
|
||||
#Umstellung auf udev. es wird kein devfsd mehr gestartet. dafuer muss unter
|
||||
#/dev ein tmpfs gemountet werden. ausserdem muss for dem start von
|
||||
#udevstart (legt die devicefiles fuer die im Kernel vorhandenen Geraete an)
|
||||
#das sysfs gemountet werden.
|
||||
#
|
||||
#Revision 1.4 2004/03/03 12:48:08 kueller
|
||||
#Header auf neuen Viitor GPL Header umgestellt
|
||||
#
|
||||
#
|
||||
#Revision 1.3 2002/01/21 16:52:44 kueller
|
||||
#Volumemanagement wird im Script mountfs initialisiert, nicht mehr hier
|
||||
#
|
||||
#Revision 1.2 2001/11/03 23:55:39 segler
|
||||
#
|
||||
#LVM moechte gerne bevor es so richtig tut einen /sbin/vgscan haben. Solls kriegen...
|
||||
#
|
||||
#Revision 1.1.1.1 2001/09/23 00:02:08 kueller
|
||||
#Neustart wg. Datenverlust
|
||||
#
|
||||
#Revision 1.1.1.1 2001/08/08 10:02:32 kueller
|
||||
#sysvinit addons
|
||||
#
|
||||
#
|
||||
|
||||
# Begin /etc/init.d/rcS
|
||||
|
||||
@ -78,16 +113,30 @@ fi
|
||||
|
||||
umount /proc
|
||||
|
||||
if [ -f /sbin/udevd ]; then
|
||||
echo -n "Mounting /sys"
|
||||
mount -t sysfs none /sys
|
||||
evaluate_retval
|
||||
if [ -f /sbin/udevstart ]; then
|
||||
. /etc/init.d/functions
|
||||
. /etc/udev/udev.conf
|
||||
prog=udev
|
||||
sysfs_dir=/sys
|
||||
bin=/lib/udev
|
||||
udevd=/sbin/udevd
|
||||
udev_root=/dev
|
||||
echo "Bringing udev sytem up"
|
||||
echo -n "mounting sys "
|
||||
mount -t sysfs none /sys
|
||||
echo -n "/var/lock "
|
||||
if [ ! -d /var/lock/subsys ]; then
|
||||
mkdir /var/lock/subsys
|
||||
fi
|
||||
if [ ! -d /dev ]; then
|
||||
mkdir /dev
|
||||
if [ ! -d $udev_root ]; then
|
||||
mkdir $udev_root
|
||||
fi
|
||||
echo -n "/dev "
|
||||
mount -t tmpfs none /dev
|
||||
export ACTION=add
|
||||
echo -n "Creating initial udev device nodes:"
|
||||
loadproc udevstart
|
||||
mkdir /dev/pts
|
||||
fi
|
||||
|
||||
for i in /etc/init.d/rcS.d/S??*
|
||||
|
@ -122,22 +122,22 @@ case "$1" in
|
||||
route add -$TYPE $NETWORK netmask $NETMASK gw $GW
|
||||
evaluate_retval
|
||||
fi
|
||||
read <&3 TYPE NETWORK OPTION GW NETMASK
|
||||
done
|
||||
exec 3>&-
|
||||
rm /tmp/gateways
|
||||
fi
|
||||
if [ -f /etc/sysconfig/net/defaultrouter ]; then
|
||||
echo -n "setting up defaultrouter `cat /etc/sysconfig/net/defaultrouter`"
|
||||
$DEBUG route add default gw `cat /etc/sysconfig/net/defaultrouter`
|
||||
evaluate_retval
|
||||
fi
|
||||
NUMIF=`ip -f inet addr show|grep inet|wc -l`
|
||||
if [ $NUMIF -gt 2 ]; then
|
||||
echo -n "Enable ip_forwarding"
|
||||
echo "1" >/proc/sys/net/ipv4/ip_forward
|
||||
evaluate_retval
|
||||
fi
|
||||
read <&3 TYPE NETWORK OPTION GW NETMASK
|
||||
done
|
||||
exec 3>&-
|
||||
rm /tmp/gateways
|
||||
fi
|
||||
if [ -f /etc/sysconfig/net/defaultrouter ]; then
|
||||
echo -n "setting up defaultrouter `cat /etc/sysconfig/net/defaultrouter`"
|
||||
$DEBUG route add default gw `cat /etc/sysconfig/net/defaultrouter`
|
||||
evaluate_retval
|
||||
fi
|
||||
NUMIF=`ip -f inet addr show|grep inet|wc -l`
|
||||
if [ $NUMIF -gt 2 ]; then
|
||||
echo -n "Enable ip_forwarding"
|
||||
echo "1" >/proc/sys/net/ipv4/ip_forward
|
||||
evaluate_retval
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
@ -62,15 +62,14 @@ for i in *; do
|
||||
done
|
||||
mkdir rc{S,0,1,2,3,4,5,6}.d
|
||||
cd rcS.d
|
||||
ln -s ../checkfs S10checkfs
|
||||
ln -s ../mountfs S15mountfs
|
||||
ln -s ../checkfs S05checkfs
|
||||
ln -s ../mountfs S10mountfs
|
||||
ln -s ../setclock S20setclock
|
||||
ln -s ../loadkeys S25loadkeys
|
||||
ln -s ../loadkeys S30loadkeys
|
||||
cd ..
|
||||
|
||||
for i in 0 6; do
|
||||
cd rc$i.d
|
||||
ln -s ../dbus K74dbus
|
||||
ln -s ../ifup K80ifup
|
||||
ln -s ../sendsignals K80sendsignals
|
||||
ln -s ../loadmodules K87loadmodules
|
||||
@ -81,7 +80,6 @@ done
|
||||
cd rc0.d
|
||||
ln -s ../halt S99halt
|
||||
cd ..
|
||||
|
||||
cd rc6.d
|
||||
ln -s ../reboot S99reboot
|
||||
cd ..
|
||||
@ -94,7 +92,6 @@ for i in 1 2 3 4 5; do
|
||||
ln -s ../ifup S10ifup
|
||||
ln -s ../routing S11routing
|
||||
ln -s ../install S11install
|
||||
ln -s ../dbus S12dbus
|
||||
cd ..
|
||||
done
|
||||
ln -s ../init.d init.d
|
||||
|
43
sbin/if_down
43
sbin/if_down
@ -35,25 +35,14 @@ if [ ! "$DEV" ]; then
|
||||
echo "Usage: $0 <NetworkInterfaceName>"
|
||||
exit 10
|
||||
fi
|
||||
if pgrep vtun >/dev/null; then
|
||||
/etc/init.d/vtund stop
|
||||
fi
|
||||
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
||||
echo -n "Stopping dhclient for $DEV"
|
||||
DHPID=`ps -ef|grep dhclient|grep ${DEV}|awk '{print $2}'`
|
||||
if [ "$DHPID" ]; then
|
||||
kill $DHPID
|
||||
fi
|
||||
evaluate_retval
|
||||
echo -n "Shutting down Interface $DEV"
|
||||
ifconfig $DEV 0.0.0.0 down
|
||||
evaluate_retval
|
||||
kill `ps -ef|grep dhclient|grep eth0|awk '{print $2}'`
|
||||
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
|
||||
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
|
||||
IP=`grep $HOST /etc/hosts|awk '{print $1}'`
|
||||
NETMASK=`getmask $IP`
|
||||
SHMASK=`GetShortMask $NETMASK`
|
||||
echo -n "shutting down interface $i:IP=$IP NMASK=$NETMASK"
|
||||
echo -n "setting up interface $i:IP=$IP NMASK=$NETMASK"
|
||||
if [ "$NETMASK" = "" ]; then
|
||||
DEV=`echo $i|cut -d ":" -f 1`
|
||||
$DEBUG ip addr del $IP broadcast + dev $DEV
|
||||
@ -65,31 +54,3 @@ elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
|
||||
fi
|
||||
evaluate_retval
|
||||
fi
|
||||
if [ -f /var/run/shutdown/wlan_nis ]; then
|
||||
if [ -f /etc/sysconfig/nis/defaultdomain.wlan ]; then
|
||||
echo -n "Restoring nis defaultdomain"
|
||||
mv /etc/sysconfig/nis/defaultdomain.wlan \
|
||||
/etc/sysconfig/nis/defaultdomain
|
||||
evaluate_retval
|
||||
fi
|
||||
if [ -f /etc/yp.conf.wlan ]; then
|
||||
echo -n "Restoring nis yp.conf"
|
||||
mv /etc/yp.conf.wlan \
|
||||
/etc/yp.conf
|
||||
evaluate_retval
|
||||
fi
|
||||
rm /var/run/shutdown/wlan_nis
|
||||
if [ -f /var/run/shutdown/wlan_dns ]; then
|
||||
if [ -f /etc/resolv.conf.wlan ]; then
|
||||
echo -n "Restoring resolv.conf"
|
||||
mv /etc/resolv.conf.wlan /etc/resolv.conf
|
||||
evaluate_retval
|
||||
fi
|
||||
rm /var/run/shutdown/wlan_dns
|
||||
fi
|
||||
fi
|
||||
if pgrep wpa_supplicant >/dev/null; then
|
||||
echo -n "Stopping wpa_supplicant"
|
||||
pkill wpa_supplicant
|
||||
evaluate_retval
|
||||
fi
|
||||
|
105
sbin/if_up
105
sbin/if_up
@ -30,96 +30,31 @@
|
||||
#
|
||||
|
||||
source /etc/init.d/functions
|
||||
|
||||
DEV=$1
|
||||
|
||||
CheckForLink() {
|
||||
NETDEVICE=$1
|
||||
if [ -f /usr/sbin/ethtool ]; then
|
||||
#Einige Dumme Interfaces (z.B. die VMware Emulationen) Zeiten
|
||||
#den korrekten Status erst nach einem ifconfig up
|
||||
WAITTIME=7
|
||||
ZAHLER=0
|
||||
if ! ethtool $NETDEVICE|grep -q "No data available"; then
|
||||
while [ ${ZAHLER} -le ${WAITTIME} ]; do
|
||||
if [ ! `ethtool $NETDEVICE|grep Link|awk '{print $3}'` == "yes" ]; then
|
||||
(( ZAHLER++ ))
|
||||
else
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ `ethtool $NETDEVICE|grep Link|awk '{print $3}'` == "yes" ]; then
|
||||
touch /var/run/net_up
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
touch /var/run/net_up
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
touch /var/run/net_up
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
if [ ! "$DEV" ]; then
|
||||
echo "Usage: $0 <NetworkInterfaceName>"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
#Check for files in /etc/sysconfig/net
|
||||
#hostname.<if> will setup static ip for the interfaces, based
|
||||
#on /etc/hosts (hostname) and /etc/networks (netmask/Broadcast)
|
||||
#<if>.dhcp will do a dynamic setup for the interface with dhcp
|
||||
|
||||
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
||||
#ok this is the dynamic part for setup ${DEV}
|
||||
#first we have to startup interface to check interface type
|
||||
ifconfig ${DEV} up
|
||||
#Let check in /sys if the interface is a wireless interface
|
||||
if [ -d /sys/class/net/${DEV}/wireless ]; then
|
||||
#wireless interface need special setup..
|
||||
/sbin/wlan_setup ${DEV}
|
||||
#give wlan time to startup and create a link
|
||||
sleep 1
|
||||
fi
|
||||
#let check if there is a link on the interface.
|
||||
#only if there is a link, we will setup the interface..
|
||||
if CheckForLink ${DEV}; then
|
||||
echo -n "Setting up ${DEV} with dhcp"
|
||||
dhclient -q ${DEV}
|
||||
evaluate_retval
|
||||
else
|
||||
ifconfig ${DEV} down
|
||||
fi
|
||||
echo -n "Setting up ${DEV} with dhcp"
|
||||
dhclient -q ${DEV}
|
||||
evaluate_retval
|
||||
elif ls /etc/sysconfig/net/hostname.${DEV}* &>/dev/null; then
|
||||
ifconfig ${DEV} up
|
||||
if [ -d /sys/class/net/${DEV}/wireless ]; then
|
||||
/sbin/wlan_setup ${DEV}
|
||||
#give wlan time to startup and create a link
|
||||
sleep 1
|
||||
fi
|
||||
if CheckForLink ${DEV}; then
|
||||
for NETDEV in `ls /etc/sysconfig/net/hostname.${DEV}*|awk -F "." '{print $2}'`; do
|
||||
HOST=`cat /etc/sysconfig/net/hostname.${NETDEV}|awk '{print $1}'`
|
||||
IP=`grep $HOST /etc/hosts|awk '{print $1}'`
|
||||
NETMASK=`getmask $IP`
|
||||
SHMASK=`GetShortMask $NETMASK`
|
||||
echo -n "setting up interface $NETDEV:IP=$IP NMASK=$NETMASK"
|
||||
if [ "$NETMASK" = "" ]; then
|
||||
DEV=`echo $NETDEV|cut -d ":" -f 1`
|
||||
$DEBUG ip addr add $IP broadcast + dev $DEV
|
||||
$DEBUG ip link set $DEV up
|
||||
else
|
||||
DEV=`echo $NETDEV|cut -d ":" -f 1`
|
||||
$DEBUG ip addr add $IP/$SHMASK broadcast + dev $DEV
|
||||
$DEBUG ip link set $DEV up
|
||||
fi
|
||||
done
|
||||
else
|
||||
ifconfig ${DEV} down
|
||||
fi
|
||||
for NETDEV in `ls /etc/sysconfig/net/hostname.${DEV}*|awk -F "." '{print $2}'`; do
|
||||
HOST=`cat /etc/sysconfig/net/hostname.${NETDEV}|awk '{print $1}'`
|
||||
IP=`grep $HOST /etc/hosts|awk '{print $1}'`
|
||||
NETMASK=`getmask $IP`
|
||||
SHMASK=`GetShortMask $NETMASK`
|
||||
echo -n "setting up interface $NETDEV:IP=$IP NMASK=$NETMASK"
|
||||
if [ "$NETMASK" = "" ]; then
|
||||
DEV=`echo $NETDEV|cut -d ":" -f 1`
|
||||
$DEBUG ip addr add $IP broadcast + dev $DEV
|
||||
$DEBUG ip link set $DEV up
|
||||
else
|
||||
DEV=`echo $NETDEV|cut -d ":" -f 1`
|
||||
$DEBUG ip addr add $IP/$SHMASK broadcast + dev $DEV
|
||||
$DEBUG ip link set $DEV up
|
||||
fi
|
||||
done
|
||||
evaluate_retval
|
||||
fi
|
||||
|
@ -39,16 +39,12 @@ if [ ! -f /var/state/ldap_disable ]; then
|
||||
touch /var/state/ldap_disable
|
||||
fi
|
||||
|
||||
if [ ! -d /var/run/shutdown ]; then
|
||||
mkdir -p /var/run/shutdown
|
||||
fi
|
||||
NSSWITCH=/etc/nsswitch.conf
|
||||
DEV=$1
|
||||
if [ ! "$DEV" ]; then
|
||||
echo "usage: $0 <WireLessLanDevice>"
|
||||
exit 1
|
||||
fi
|
||||
/sbin/ifconfig $DEV up
|
||||
if [ ! -d /sys/class/net/$DEV/wireless ]; then
|
||||
echo "No Wireless Device"
|
||||
exit 2
|
||||
@ -67,9 +63,6 @@ for AP in `iwlist $DEV scan 2>/dev/null|\
|
||||
read <&3 OPTION ARG1 ARG2
|
||||
while [ $OPTION ]; do
|
||||
case $OPTION in
|
||||
WPA2|WPA)
|
||||
wpa_supplicant -i ${DEV} -D ${ARG1} -c /etc/sysconfig/wpa_supplicant/${AP} -B
|
||||
;;
|
||||
KEY)
|
||||
echo -n "Configuring Wireless Interface KEY"
|
||||
$DEBUG iwconfig $DEV key $ARG1 $ARG2
|
||||
@ -79,64 +72,22 @@ for AP in `iwlist $DEV scan 2>/dev/null|\
|
||||
$DEBUG iwconfig $DEV txpower $ARG1
|
||||
;;
|
||||
YP)
|
||||
if [ -f /var/run/shutdown/wlan_nis ]; then
|
||||
echo "No Clean Shutdown, cleaning up"
|
||||
if [ -f /etc/sysconfig/nis/defaultdomain.wlan ]; then
|
||||
mv /etc/sysconfig/nis/defaultdomain.wlan \
|
||||
/etc/sysconfig/nis/defaultdomain
|
||||
elif [ -f /etc/sysconfig/nis/defaultdomain ]; then
|
||||
rm /etc/sysconfig/nis/defaultdomain
|
||||
fi
|
||||
if [ -f /etc/yp.conf.wlan ]; then
|
||||
mv /etc/yp.conf.wlan /etc/yp.conf
|
||||
elif [ -f /etc/yp.conf ]; then
|
||||
rm /etc/yp.conf
|
||||
fi
|
||||
fi
|
||||
touch /var/run/shutdown/wlan_nis
|
||||
if [ "$ARG1" ]; then
|
||||
if [ -f /etc/sysconfig/nis/defaultdomain ]; then
|
||||
mv /etc/sysconfig/nis/defaultdomain{,.wlan}
|
||||
fi
|
||||
echo "$ARG1" >/etc/sysconfig/nis/defaultdomain
|
||||
fi
|
||||
if [ "$ARG2" ]; then
|
||||
if [ -f /etc/yp.conf ]; then
|
||||
mv /etc/yp.conf{,.wlan}
|
||||
fi
|
||||
echo "domain $ARG1 server $ARG2" >/etc/yp.conf
|
||||
fi
|
||||
NISSTR="nis"
|
||||
;;
|
||||
echo "domain $ARG1 server $ARG2" >/etc/yp.conf
|
||||
NISSTR="nis"
|
||||
;;
|
||||
LDAP)
|
||||
export USE_LDAP=1
|
||||
LDAPSTR="ldap"
|
||||
rm /var/state/ldap_disable
|
||||
;;
|
||||
DNS)
|
||||
if [ -f /var/run/shutdown/wlan_dns ]; then
|
||||
echo "No Clean Shutdown, cleaning up"
|
||||
if [ -f /etc/resolv.conf.wlan ]; then
|
||||
mv /etc/resolv.conf.wlan /etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
touch /var/run/shutdown/wlan_dns
|
||||
if [ -f /etc/resolv.conf ]; then
|
||||
mv /etc/resolv.conf{,.wlan}
|
||||
fi
|
||||
echo "#Resolv.conf generatet by wlan_setup" >/etc/resolv.conf
|
||||
echo "nameserver $ARG1" >>/etc/resolv.conf
|
||||
;;
|
||||
VTUN)
|
||||
echo "Starting vtun client"
|
||||
/etc/init.d/vtund start
|
||||
;;
|
||||
esac
|
||||
read <&3 OPTION ARG1 ARG2
|
||||
done
|
||||
exec 3>&-
|
||||
ifconfig $DEV down
|
||||
ifconfig $DEV up
|
||||
rm /tmp/AP
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user