SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Wed Oct 24 20:03:04 CEST 2007


Author: glen
Date: Wed Oct 24 20:03:04 2007
New Revision: 8855

Modified:
   geninitrd/trunk/geninitrd
Log:
- unify some internal variables

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Wed Oct 24 20:03:04 2007
@@ -27,8 +27,6 @@
 USEINSMODSTATIC="no"
 USE_SUSPEND="yes"
 USE_TUXONICE="yes"
-uselvm="no"
-usenfs="no"
 # it should be safe to remove scsi_mod from here, but I'm not sure...
 PRESCSIMODS="-scsi_mod unknown -sd_mod"
 PREIDEMODS="-ide-core unknown -ide-detect -ide-disk"
@@ -61,8 +59,12 @@
 proc_partitions=no
 # dmraid component devices of rootfs is on dmraid
 dmraid_devices=''
+# if we should init NFS at boot
+have_nfs=no
+# if we should init LVM at boot
+have_lvm="no"
 # if we should init dm-multipath at boot
-use_multipath=no
+have_multipath=no
 
 if [ -f /etc/udev/udev.conf -a -x /sbin/initrd-udevd ]; then
 	USE_UDEV="yes"
@@ -536,7 +538,7 @@
 		done
 		findmodule "-ipv4"
 		findmodule "nfs"
-		usenfs="yes"
+		have_nfs=yes
 		echo >&2 "Remember to use \`root=/dev/ram0 init=/linuxrc' when starting kernel"
 		echo >&2 "or you will have problems like init(xx) being child process of swapper(1)."
 		return
@@ -555,7 +557,7 @@
 		local info=$(multipath -l $id)
 		if [ "$info" ]; then
 			debug "have multipath"
-			use_multipath=yes
+			have_multipath=yes
 			local dev phydevs=$(echo "$info" | awk '$2 ~ /^[0-9]+:[0-9]+:[0-9]+:[0-9]+$/{printf("/dev/%s\n", $3)}')
 			for dev in $phydevs; do
 				find_modules_for_device $dev
@@ -694,7 +696,7 @@
 			die "LVM version $LVMTOOLSVERSION is not supported yet."
 		fi
 		debug "LVM $LVMTOOLSVERSION enabled"
-		uselvm="yes"
+		have_lvm=yes
 		return
 	fi
 }
@@ -1489,7 +1491,7 @@
 		if is_yes "$raidfound"; then
 			echo "	md_component_detection = 1" >> "$MNTIMAGE/etc/lvm.conf"
 		fi
-		if [ "$dmraid_devices" ] || is_yes "$use_multipath"; then
+		if [ "$dmraid_devices" ] || is_yes "$have_multipath"; then
 			echo '	types = [ "device-mapper", 254 ]' >> "$MNTIMAGE/etc/lvm.conf"
 		fi
 		if [ "$dmraid_devices" ]; then
@@ -1570,20 +1572,20 @@
 	initrd_gen_dmraid
 fi
 
-if [ "$use_multipath" ]; then
+if [ "$have_multipath" ]; then
 	initrd_gen_multipath
 fi
 
-if is_yes "$usenfs" ; then
+if is_yes "$have_nfs"; then
 	initrd_gen_nfs
 elif is_yes "$USERAIDSTART" && is_yes "$raidfound"; then
 	initrd_gen_softraid
-	if is_yes "$uselvm"; then
+	if is_yes "$have_lvm"; then
 		initrd_gen_lvm
 	else
 		initrd_gen_procdata
 	fi
-elif is_yes "$uselvm"; then
+elif is_yes "$have_lvm"; then
 	initrd_gen_lvm
 else
 	initrd_gen_procdata


More information about the pld-cvs-commit mailing list