[SCM] live-boot branch, debian-next, updated. debian/3.0_a38-1-6-g4ecca9f

Daniel Baumann daniel at debian.org
Mon Aug 13 23:20:30 UTC 2012


The following commit has been merged in the debian-next branch:
commit 4ecca9f9ba476c987f41fdb596bd5f4f53d85a3c
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Aug 14 01:20:28 2012 +0200

    Consistently using case instead of if for conditionals in script boilerplate.

diff --git a/scripts/boot/0110-debug b/scripts/boot/0110-debug
index a74dcb7..f223e93 100755
--- a/scripts/boot/0110-debug
+++ b/scripts/boot/0110-debug
@@ -13,10 +13,15 @@ Debug ()
 		esac
 	done
 
-	if [ "${LIVE_DEBUG}" != "true" ]
-	then
-		return 0
-	fi
+	case "${LIVE_DEBUG}" in
+		true)
+			;;
 
+		*)
+			return 0
+			;;
+	esac
+
+	# Write the trace output
 	set -x
 }
diff --git a/scripts/boot/0120-read-only b/scripts/boot/0120-read-only
index c05c162..859f771 100755
--- a/scripts/boot/0120-read-only
+++ b/scripts/boot/0120-read-only
@@ -18,10 +18,14 @@ Read_only ()
 		esac
 	done
 
-	if [ "${LIVE_READ_ONLY}" != "true" ]
-	then
-		return 0
-	fi
+	case "${LIVE_READ_ONLY}" in
+		true)
+			;;
+
+		*)
+			return 0
+			;;
+	esac
 
 	# Marking some block devices as read-only to ensure that nothing
 	# gets written as linux still writes to 'only' read-only mounted filesystems.
diff --git a/scripts/boot/3010-verify-checksums b/scripts/boot/3010-verify-checksums
index 3649e04..8ccd663 100755
--- a/scripts/boot/3010-verify-checksums
+++ b/scripts/boot/3010-verify-checksums
@@ -18,10 +18,14 @@ Verify_checksums ()
 		esac
 	done
 
-	if [ "${LIVE_VERIFY_CHECKSUMS}" != "true" ]
-	then
-		return 0
-	fi
+	case "${LIVE_VERIFY_CHECKSUMS}" in
+		true)
+			;;
+
+		*)
+			return 0
+			;;
+	esac
 
 	_MOUNTPOINT="${1}"
 
diff --git a/scripts/boot/3020-swapon b/scripts/boot/3020-swapon
index 82e998a..7541c26 100755
--- a/scripts/boot/3020-swapon
+++ b/scripts/boot/3020-swapon
@@ -18,10 +18,14 @@ Swap ()
 		esac
 	done
 
-	if [ "${LIVE_SWAP}" != "true" ]
-	then
-		return 0
-	fi
+	case "${LIVE_SWAP}" in
+		true)
+			;;
+
+		*)
+			return 0
+			;;
+	esac
 
 	LIVE_SWAP_DEVICES="${LIVE_SWAP_DEVICES:-/dev/sd* /dev/vd*}"
 

-- 
live-boot



More information about the debian-live-changes mailing list