[arch-commits] CVS update of core/base/initscripts (8 files)

Tobias Powalowski tpowa at archlinux.org
Thu Oct 18 08:43:29 UTC 2007


    Date: Thursday, October 18, 2007 @ 04:43:29
  Author: tpowa
    Path: /home/cvs-core/core/base/initscripts

Modified: PKGBUILD (1.178 -> 1.179) inittab (1.4 -> 1.5)
          makedevs (1.7 -> 1.8) netcfg (1.15 -> 1.16) rc.conf (1.37 -> 1.38)
          rc.shutdown (1.31 -> 1.32) rc.single (1.16 -> 1.17)
          rc.sysinit (1.109 -> 1.110)

'upgpkg: trying to fix #6237,7554,7165,7641,5740'


-------------+
 PKGBUILD    |   19 +++++++++----------
 inittab     |   13 +++++++------
 makedevs    |   16 ++++++++--------
 netcfg      |   18 +++++++++---------
 rc.conf     |    3 +++
 rc.shutdown |    8 ++++----
 rc.single   |    6 +++---
 rc.sysinit  |   31 ++++++++++++++++++++-----------
 8 files changed, 63 insertions(+), 51 deletions(-)


Index: core/base/initscripts/PKGBUILD
diff -u core/base/initscripts/PKGBUILD:1.178 core/base/initscripts/PKGBUILD:1.179
--- core/base/initscripts/PKGBUILD:1.178	Tue Sep 18 12:53:15 2007
+++ core/base/initscripts/PKGBUILD	Thu Oct 18 04:43:28 2007
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.178 2007/09/18 16:53:15 thomas Exp $
+# $Id: PKGBUILD,v 1.179 2007/10/18 08:43:28 tpowa Exp $
 # Maintainer: judd <jvinet at zeroflux.org>
 pkgname=initscripts
 pkgver=2007.08
-pkgrel=3
+pkgrel=4
 pkgdesc="System initialization/bootup scripts"
 arch=('i686' 'x86_64')
 url="http://www.archlinux.org"
@@ -15,18 +15,18 @@
         rc.single rc.sysinit network minilogd.c netfs makedevs \
         netcfg profile-template rc.local.shutdown)
 md5sums=('b377a66678b6bd9cdbf1a71750860930'
-         'b1d53aba3997e2a85cc887da45ec8c0f'
-         '9151763518526dffe33a2483b2e9dec3'
+         '07c50550ceb86ffe8c03005b57d214aa'
+         'dcd3abb00783230aeee16055797e64d1'
          'bd236a57bc00aa4727b98c5ae401c457'
          '3c1f9e4cadc877a0ac65de18b0b7df2c'
-         '42367d7e023500775a6db5c738f08ff9'
-         'df82de02bc276ed82ead63e776406602'
-         '8f9c843418575126c86b083123a69f61'
+         '4f6f4557f49a3b467a5b400fd6ab1992'
+         '5c9b86ec8ab91229e2880a750bd70a0f'
+         '3168313d56bf3d18b25c0d86ef3ae7fd'
          'af0896125a451c16cda0b18b416784b9'
          'f638d2a7ecbdb1d0207023ef41621586'
          '5de1b6b4812a83f65ef3fcefc3942217'
-         '324f1d8e26d31af0edb172319b839f82'
-         '2d308ca2e8efd2d3e9b217575db03390'
+         'e12f4f2d331e17958b6234c8cd9db7b0'
+         'e2c00bafd2e03e2dfc1de684f909fd8e'
          'c1051c3e6fc2accd0d942c246e14a260'
          '669ce6d766dd9deb86686219f3763fe4')
 
@@ -46,4 +46,3 @@
   install -D -m755 makedevs $startdir/pkg/sbin/makedevs
   install -D -m600 profile-template $startdir/pkg/etc/network-profiles/template
 }
-
Index: core/base/initscripts/inittab
diff -u core/base/initscripts/inittab:1.4 core/base/initscripts/inittab:1.5
--- core/base/initscripts/inittab:1.4	Tue Jan  3 04:06:09 2006
+++ core/base/initscripts/inittab	Thu Oct 18 04:43:28 2007
@@ -19,12 +19,13 @@
 rh:06:wait:/etc/rc.shutdown
 su:S:wait:/sbin/sulogin -p
 
-c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
-c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
-c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
-c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
-c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
-c6:2345:respawn:/sbin/agetty 38400 vc/6 linux
+# -8 options fixes umlauts problem on login
+c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
+c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
+c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
+c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
+c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
+c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux
 
 ca::ctrlaltdel:/sbin/shutdown -t3 -r now
 
Index: core/base/initscripts/makedevs
diff -u core/base/initscripts/makedevs:1.7 core/base/initscripts/makedevs:1.8
--- core/base/initscripts/makedevs:1.7	Tue May  9 14:23:42 2006
+++ core/base/initscripts/makedevs	Thu Oct 18 04:43:28 2007
@@ -6,21 +6,21 @@
 
 cd $devdir
 
-for i in `find /sys/block -name dev`; do
+for i in $(find /sys/block -name dev); do
 	# get the second-to-last field
-	name=`echo $i | rev | cut -d/ -f2 | rev`
-	maj=`cat $i | cut -d: -f1`
-	min=`cat $i | cut -d: -f2`
+	name=$(echo $i | rev | cut -d/ -f2 | rev)
+	maj=$(cat $i | cut -d: -f1)
+	min=$(cat $i | cut -d: -f2)
 	[ ! -e $name ] && mknod $name b $maj $min
 done
 
-for i in `find /sys/class -name dev`; do
+for i in $(find /sys/class -name dev); do
 	# get the second-to-last field
-	name=`echo $i | rev | cut -d/ -f2 | rev`
+	name=$(echo $i | rev | cut -d/ -f2 | rev)
 	# skip all the tty?? nodes
 	#[ "${name%%??}" = "tty" ] && continue
 	#[ "${name%%??}" = "pty" ] && continue
-	maj=`cat $i | cut -d: -f1`
-	min=`cat $i | cut -d: -f2`
+	maj=$(cat $i | cut -d: -f1)
+	min=$(cat $i | cut -d: -f2)
 	[ ! -e $name ] && mknod $name c $maj $min
 done
Index: core/base/initscripts/netcfg
diff -u core/base/initscripts/netcfg:1.15 core/base/initscripts/netcfg:1.16
--- core/base/initscripts/netcfg:1.15	Wed May  9 20:18:05 2007
+++ core/base/initscripts/netcfg	Thu Oct 18 04:43:28 2007
@@ -56,7 +56,7 @@
 		# if the dhcp client received an unlimited lease then it just exits,
 		# so check for .pid file before trying to kill it.
 		if [ -f /var/run/dhcpcd-${INTERFACE}.pid ]; then
-			kill `cat /var/run/dhcpcd-${INTERFACE}.pid`
+			kill $(cat /var/run/dhcpcd-${INTERFACE}.pid)
 		fi
 	fi
 
@@ -71,7 +71,7 @@
 stop_all()
 {
 	[ -d $STATE_DIR ] || return
-	for prof in `ls $STATE_DIR`; do
+	for prof in $(ls $STATE_DIR); do
 		unset INTERFACE
 		. $STATE_DIR/$prof
 		stop_profile $INTERFACE
@@ -120,7 +120,7 @@
 	  
 		WPA_CONF="/etc/wpa_supplicant.conf"	
 		if [ "$AUTOWPA" = "yes" -o "$AUTOWPA" = "YES" ]; then
-			WPA_CONF=`mktemp /tmp/wpa.XXXXXXXX`
+			WPA_CONF=$(mktemp /tmp/wpa.XXXXXXXX)
 			# file will contain PSK, limit reading
 			chmod 600 $WPA_CONF
 			echo "ctrl_interface=/var/run/wpa_supplicant" > $WPA_CONF
@@ -131,7 +131,7 @@
 		[ "$WPAOPTS" ] || WPAOPTS="-Dwext"
 		wpa_supplicant -wB -i ${WIFI_INTERFACE} -c ${WPA_CONF} $WPAOPTS 
 		
-	  # I don´t know how we could determine if wpa_supplicant is ready	
+	  # I don�t know how we could determine if wpa_supplicant is ready	
 		sleep 2
 		let i=0
 		while ! wpa_cli status | grep "wpa_state=COMPLETED" >/dev/null 2>&1; do
@@ -185,7 +185,7 @@
 
 menu()
 {
-	if [ "`ls $PROFILE_DIR 2>/dev/null | grep -v ^template$`" = "" -o ! -d $PROFILE_DIR ]; then
+	if [ "$(ls $PROFILE_DIR 2>/dev/null | grep -v ^template$)" = "" -o ! -d $PROFILE_DIR ]; then
 		echo "No profiles found.  Add profiles in $PROFILE_DIR"
 		return
 	fi
@@ -193,7 +193,7 @@
 	unset profiles
 	DEFAULT=
 	i=0
-	for prof in `ls $PROFILE_DIR`; do
+	for prof in $(ls $PROFILE_DIR); do
 		# ignore the template
 		[ "$prof" = "template" ] && continue
 		NAME=$prof
@@ -218,7 +218,7 @@
 	# if no default yet, use the first entry
 	[ "$DEFAULT" = "" ] && DEFAULT=${profiles[0]}
 
-	ANSWER=`mktemp` || exit 1
+	ANSWER=$(mktemp) || exit 1
 
 	if [ "$TIMEOUT" != "" ]; then
 		dialog \
@@ -242,7 +242,7 @@
 	case $ret in
 		1) ;;                                # cancel - do nothing
 		255) start_profile $DEFAULT ;;       # timeout - use default
-		0)   start_profile `cat $ANSWER` ;;  # user selection
+		0)   start_profile $(cat $ANSWER) ;;  # user selection
 		# abnormal
 		*) echo "abnormal ret code from dialog: $ret" ;;
 	esac
@@ -254,7 +254,7 @@
 #  Begin
 #
 
-if [ "`id -u`" != "0" ]; then
+if [ "$(id -u)" != "0" ]; then
 	echo "This script should be run as root."
 	exit 1
 fi
Index: core/base/initscripts/rc.conf
diff -u core/base/initscripts/rc.conf:1.37 core/base/initscripts/rc.conf:1.38
--- core/base/initscripts/rc.conf:1.37	Mon Jan 29 16:51:35 2007
+++ core/base/initscripts/rc.conf	Thu Oct 18 04:43:28 2007
@@ -54,6 +54,9 @@
 # Declare each interface then list in INTERFACES
 #   - prefix an entry in INTERFACES with a ! to disable it
 #   - no hyphens in your interface names - Bash doesn't like it
+# Don't disable lo, localhost (bound to lo by default) is often used for
+# interprocess communication.
+# Don't use this for wireless interfaces, see network profiles below
 #
 # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
 #
Index: core/base/initscripts/rc.shutdown
diff -u core/base/initscripts/rc.shutdown:1.31 core/base/initscripts/rc.shutdown:1.32
--- core/base/initscripts/rc.shutdown:1.31	Sun May 13 08:01:11 2007
+++ core/base/initscripts/rc.shutdown	Thu Oct 18 04:43:28 2007
@@ -26,14 +26,14 @@
 	# Shutdown daemons
 	let i=${#DAEMONS[@]}
 	while [[ i -ge 0 ]]; do
-		if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then
-			/etc/rc.d/${DAEMONS[$i]#@} stop
+		if [[ $(echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l) -eq 1 ]]; then
+			[ -f /var/run/daemons/${DAEMONS[$i]#@} ] && /etc/rc.d/${DAEMONS[$i]#@} stop
 		fi
 		let i=i-1
 	done
-	# find any leftover daemons and shut them down
+	# find any leftover daemons and shut them down in reverse order
 	if [ -d /var/run/daemons ]; then
-		for daemon in `ls /var/run/daemons`; do
+		for daemon in $(ls -1t /var/run/daemons); do
 			/etc/rc.d/$daemon stop
 		done
 	fi
Index: core/base/initscripts/rc.single
diff -u core/base/initscripts/rc.single:1.16 core/base/initscripts/rc.single:1.17
--- core/base/initscripts/rc.single:1.16	Sat Dec 16 17:03:29 2006
+++ core/base/initscripts/rc.single	Thu Oct 18 04:43:28 2007
@@ -10,14 +10,14 @@
 	# Shutdown daemons
 	let i=${#DAEMONS[@]}
 	while [[ i -gt 0 ]]; do
-		if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then
+		if [[ $(echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l) -eq 1 ]]; then
 			/etc/rc.d/${DAEMONS[$i]#@} stop
 		fi
 		let i=i-1
 	done
 	# find any leftover daemons and shut them down
 	if [ -d /var/run/daemons ]; then
-		for daemon in `ls /var/run/daemons`; do
+		for daemon in $(ls /var/run/daemons); do
 			/etc/rc.d/$daemon stop
 		done
 	fi
@@ -37,7 +37,7 @@
 	if [ -x /etc/start_udev -a -d /sys/block ]; then
 		# We have a start_udev script and /sys appears to be mounted, use UDev
 		status "Starting UDev Daemon" /etc/start_udev
-		if [ "`pidof -o %PPID /sbin/udevd`" ]; then
+		if [ "$(pidof -o %PPID /sbin/udevd)" ]; then
 			# If an old udevd is kicking around, we'll have to remount pts and shm
 			umount /dev/shm /dev/pts >/dev/null 2>&1
 			mount /dev/pts
Index: core/base/initscripts/rc.sysinit
diff -u core/base/initscripts/rc.sysinit:1.109 core/base/initscripts/rc.sysinit:1.110
--- core/base/initscripts/rc.sysinit:1.109	Wed Aug 15 00:01:59 2007
+++ core/base/initscripts/rc.sysinit	Thu Oct 18 04:43:28 2007
@@ -322,33 +322,40 @@
 
 status "Updating Module Dependencies" /sbin/depmod -A
 
-if [ "$KEYMAP" != "" ]; then
-	status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP
-fi
-
 # Flush old locale settings
 : >/etc/profile.d/locale.sh
 chmod 755 /etc/profile.d/locale.sh
 # Set user defined locale
-[ "$LOCALE" != "" ] || LOCALE="en_US"
+[ -z "$LOCALE" ] && LOCALE="en_US"
 stat_busy "Setting Locale: $LOCALE"
 echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
 stat_done
 
-#	If locale is *.utf set console to Unicode mode
-if [ "$(echo $LOCALE | /bin/grep -i utf)" ]; then
+if echo "$LOCALE" | /bin/grep -qi utf ; then
 	stat_busy "Setting Consoles to UTF-8"
 	/usr/bin/kbd_mode -u
-	/usr/bin/dumpkeys | /bin/loadkeys --unicode
+	for i in $(seq 1 12); do
+		echo -ne "\e%G" >/dev/vc/${i}
+	done
+	stat_done
+	stat_busy "Loading Keyboard Map: $KEYMAP in utf-8 mode"
+	/bin/loadkeys -q -u "$KEYMAP" > /dev/null 2>&1
+else
+	stat_busy "Loading Keyboard Map: $KEYMAP in legacy mode"
+	/bin/loadkeys -q "$KEYMAP" > /dev/null 2>&1
+fi
 	# the $CONSOLE check helps us avoid this when running scripts from cron
 	echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh
 	stat_done
-fi
 
-if [ "$CONSOLEFONT" != "" ]; then
+if [ -n "$CONSOLEFONT" ]; then
 	stat_busy "Loading Console Font: $CONSOLEFONT"
+	#CONSOLEMAP in UTF-8 shouldn't be used
+	if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
+		CONSOLEMAP=""
+	fi
 	for i in $(seq 1 12); do 
-		if [ "$CONSOLEMAP" != "" ]; then
+		if [ -n "$CONSOLEMAP" ]; then
 			/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i}
 		else
 			/usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i}
@@ -358,6 +365,7 @@
 	echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh
 	stat_done
 fi
+
 # Adding persistent network/cdrom generated rules
 if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
 	stat_busy "Adding persistent cdrom udev rules"
@@ -369,6 +377,7 @@
 	/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
 	stat_done
 fi
+
 # Screen blanks after 15 minutes idle time
 /usr/bin/setterm -blank 15
 




More information about the arch-commits mailing list