SOURCES: start_udev - tabs

glen glen at pld-linux.org
Sat Sep 10 22:47:38 CEST 2005


Author: glen                         Date: Sat Sep 10 20:47:38 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- tabs

---- Files affected:
SOURCES:
   start_udev (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SOURCES/start_udev
diff -u SOURCES/start_udev:1.12 SOURCES/start_udev:1.13
--- SOURCES/start_udev:1.12	Sat Sep 10 22:43:48 2005
+++ SOURCES/start_udev	Sat Sep 10 22:47:33 2005
@@ -72,21 +72,21 @@
 
 # we cannot use /usr/bin/find here
 find_d () {
-        where=$1
-        what=$2
-        found=""
-        for f in $where/*; do
-                if [ -d "$f" -a ! -L "$f" ]; then
+	where=$1
+	what=$2
+	found=""
+	for f in $where/*; do
+		if [ -d "$f" -a ! -L "$f" ]; then
 			if [ "$f" != "${f%%$what}" ];then 
-			        # make sure we are at the path end
-			        # we have no dirname and basename
+				# make sure we are at the path end
+				# we have no dirname and basename
 				rest="${f#*$what}"
 				[ "${rest##*/}" = "$rest" ] && found="$found $f"
 			fi
-                        found="$found $(find_d $f $what)"
-                fi
-        done
-        echo "$found"
+			found="$found $(find_d $f $what)"
+		fi
+	done
+	echo "$found"
 }
 
 # we cannot use /usr/bin/find here
@@ -106,23 +106,23 @@
 
 # call hotplug with the scsi devices
 scsi_replay () {
-        HOTPLUG="/sbin/udevsend"
+	HOTPLUG="/sbin/udevsend"
 
-        scsi_hosts=$(find_d /sys/devices host\*)
-        SEQNUM=1
+	scsi_hosts=$(find_d /sys/devices host\*)
+	SEQNUM=1
 
-        for host in $scsi_hosts; do
-                [ -d $host ] || continue
-                devs=$(find_f $host type)
-                for dev in $devs;do
-                        [ -f $dev ] || continue
+	for host in $scsi_hosts; do
+		[ -d $host ] || continue
+		devs=$(find_f $host type)
+		for dev in $devs;do
+			[ -f $dev ] || continue
 			DEVPATH=${dev%/type}
-                        DEVPATH=${DEVPATH#/sys}
-                        /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device
-                        /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi
-                done
-        done
-        return 0
+			DEVPATH=${DEVPATH#/sys}
+			/bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device
+			/bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi
+		done
+	done
+	return 0
 }
 
 ide_scan() {
@@ -160,27 +160,27 @@
 
 # mount the tmpfs on ${udev_root%/}, if not already done
 LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
-        if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then
-                PTSDIR=$(mktemp -d)
-                mount --move $udev_root/pts "$PTSDIR"
-        fi
-        if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then
-                SHMDIR=$(mktemp -d)
-                mount --move $udev_root/shm "$SHMDIR"
-        fi
-        mount -n -o mode=0755 -t tmpfs none "$udev_root"
-        mkdir -m 0755 $udev_root/pts
-        mkdir -m 0755 $udev_root/shm
-        if [ -n "$PTSDIR" ]; then
-                mount --move "$PTSDIR" $udev_root/pts
-                rmdir "$PTSDIR"
-        fi
-        if [ -n "$SHMDIR" ]; then
-                mount --move "$SHMDIR" $udev_root/shm
-                rmdir "$SHMDIR"
-        fi
+	if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then
+		PTSDIR=$(mktemp -d)
+		mount --move $udev_root/pts "$PTSDIR"
+	fi
+	if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then
+		SHMDIR=$(mktemp -d)
+		mount --move $udev_root/shm "$SHMDIR"
+	fi
+	mount -n -o mode=0755 -t tmpfs none "$udev_root"
+	mkdir -m 0755 $udev_root/pts
+	mkdir -m 0755 $udev_root/shm
+	if [ -n "$PTSDIR" ]; then
+		mount --move "$PTSDIR" $udev_root/pts
+		rmdir "$PTSDIR"
+	fi
+	if [ -n "$SHMDIR" ]; then
+		mount --move "$SHMDIR" $udev_root/shm
+		rmdir "$SHMDIR"
+	fi
 
-        ret=$(( $ret + $? ))
+	ret=$(( $ret + $? ))
 }
 
 rm -rf $udev_root/.udev.tdb
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/start_udev?r1=1.12&r2=1.13&f=u




More information about the pld-cvs-commit mailing list