Package: initramfs-tools
Version: 0.120
Severity: normal

When debugging an initramfs you may wish to stop at more than one break
point in the same run.  Allow specification of multiple break points on
the command line using break=a,b syntax.

-apw
>From 037406f31a564ace91389d952f71202ab7745532 Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <a...@canonical.com>
Date: Mon, 25 Jun 2012 11:17:57 +0100
Subject: [PATCH] Allow specifying multiple break points using a comma
 delimiter.

Signed-off-by: Andy Whitcroft <a...@ubuntu.com>
---
 scripts/functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/functions b/scripts/functions
index 8c1bb1f..073fcb3 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -58,7 +58,7 @@ panic()
 
 maybe_break()
 {
-	if [ "${break:-}" = "$1" ]; then
+	if echo "${break:-}" | egrep -q "(,|^)$1(,|$)"; then
 		panic "Spawning shell within the initramfs"
 	fi
 }
-- 
2.5.0

Reply via email to