From 0d08cad43172cc04df237a4a4271525ad1d527b3 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sat, 17 Dec 2005 00:59:04 +0000 Subject: final utf8 fixes, a couple small fixes for hwdetect and netcfg --- hwdetect | 8 +++++--- netcfg | 8 +++++++- rc.sysinit | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/hwdetect b/hwdetect index 02b5c6c..a84a19f 100755 --- a/hwdetect +++ b/hwdetect @@ -37,9 +37,11 @@ usage () { exit 1 } -[ "$1" == "" ] && usage +[ "$1" == "" ] && usage +[ "$1" == "--help" ] && usage +[ "$1" == "-h" ] && usage -#setting kernel version +# setting kernel version case $1 in --kernel_version=*) KERNEL_VERSION="`echo $1 | awk -F= '{print $2;}'`" @@ -131,7 +133,7 @@ if [ "`grep 'ohci1394' /tmp/modules-plain`" ]; then fi # Modem devices -case $i in (Intel536|Intel537|ltmodem|ltserial|slarm|slusb) \ +case $i in (Intel536|Intel537|ltmodem|ltserial|slamr|slusb) \ grep "$i" /tmp/modules-plain && modprobe -i --set-version=$KERNEL_VERSION --show-depends ppp-generic >> /tmp/modules-plain 2>/dev/null ;; \ esac diff --git a/netcfg b/netcfg index 76e387c..2971084 100755 --- a/netcfg +++ b/netcfg @@ -52,7 +52,13 @@ stop_profile() [ "$USEWPA" = "yes" -o "$USEWPA" = "YES" ] && wpa_cli terminate >/dev/null 2>&1 # bring down dhcpcd if we're using it - [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ] && kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid` + if [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ]; then + # if the dhcp client received an unlimited lease then it just exits, + # so check for .pid file before trying to kill it. + if [ -f /etc/dhcpc/dhcpcd-${INTERFACE}.pid ]; then + kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid` + fi + fi # bring down the interface itself ifconfig $INTERFACE down diff --git a/rc.sysinit b/rc.sysinit index f6f50d3..f621ccb 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -223,7 +223,8 @@ if [ "$LOCALE" != "" ]; then stat_busy "Setting Consoles to UTF-8" /usr/bin/kbd_mode -u /usr/bin/dumpkeys | /bin/loadkeys --unicode - echo ' echo -ne "\e%G"'>>/etc/profile.d/locale.sh + echo 'echo -ne "\e(K"' >>/etc/profile.d/locale.sh + echo 'echo -ne "\e%G"' >>/etc/profile.d/locale.sh stat_done fi else @@ -238,7 +239,6 @@ if [ "$CONSOLEFONT" != "" ]; then else /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} fi - echo -ne "\e(K" >/dev/vc/${i} done stat_done fi -- cgit v1.2.3