FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-14-2010, 05:59 PM
Colin Watson
 
Default Bug#585897: initramfs-tools: allow multiple break points

Package: initramfs-tools
Version: 0.96.1
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch maverick

This patch is a rebased version of one from Evan Dandrea (CCed), and
allows specifying multiple break points using a comma delimiter. This
is sometimes convenient when debugging the initramfs. I added some
brief documentation.

diff --git a/initramfs-tools.8 b/initramfs-tools.8
index fd00429..7d95709 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -124,6 +124,7 @@ spawns a shell in the initramfs image at chosen run-time
The default is premount without any arg.
Beware that if both "panic" and "break" are present,
initramfs will not spawn any shells but reboot instead.
+Multiple break points may be given, separated by commas.

.TP
fBfI netconsole
diff --git a/scripts/functions b/scripts/functions
index 685642e..89451c7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -55,7 +55,7 @@ panic()

maybe_break()
{
- if [ "${break:-}" = "$1" ]; then
+ if echo "${break:-}" | egrep -q "(,|^)$1(,|$)"; then
panic "Spawning shell within the initramfs"
fi
}

Thanks,

--
Colin Watson [cjwatson@ubuntu.com]



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100614175906.GS21862@riva.ucam.org">http://lists.debian.org/20100614175906.GS21862@riva.ucam.org
 
Old 06-14-2010, 06:07 PM
Michael Prokop
 
Default Bug#585897: initramfs-tools: allow multiple break points

tags 585897 + pending
thanks

* Colin Watson <cjwatson@ubuntu.com> [Mon Jun 14, 2010 at 06:59:06PM +0100]:

> This patch is a rebased version of one from Evan Dandrea (CCed), and
> allows specifying multiple break points using a comma delimiter. This
> is sometimes convenient when debugging the initramfs. I added some
> brief documentation.

> diff --git a/initramfs-tools.8 b/initramfs-tools.8
> index fd00429..7d95709 100644
> --- a/initramfs-tools.8
> +++ b/initramfs-tools.8
> @@ -124,6 +124,7 @@ spawns a shell in the initramfs image at chosen run-time
> The default is premount without any arg.
> Beware that if both "panic" and "break" are present,
> initramfs will not spawn any shells but reboot instead.
> +Multiple break points may be given, separated by commas.

> .TP
> fBfI netconsole
> diff --git a/scripts/functions b/scripts/functions
> index 685642e..89451c7 100644
> --- a/scripts/functions
> +++ b/scripts/functions
> @@ -55,7 +55,7 @@ panic()

> maybe_break()
> {
> - if [ "${break:-}" = "$1" ]; then
> + if echo "${break:-}" | egrep -q "(,|^)$1(,|$)"; then
> panic "Spawning shell within the initramfs"
> fi
> }

Lovely idea! Thanks for forwarding, Colin.

regards,
-mika-
 
Old 06-15-2010, 04:16 PM
maximilian attems
 
Default Bug#585897: initramfs-tools: allow multiple break points

On Mon, Jun 14, 2010 at 06:59:06PM +0100, Colin Watson wrote:
> - if [ "${break:-}" = "$1" ]; then
> + if echo "${break:-}" | egrep -q "(,|^)$1(,|$)"; then

implicit dependence of BUSYBOX=yes,
i'd prefer not to introduce that, acked with sh implementation.

thank you.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100615161623.GM9869@baikonur.stro.at">http://lists.debian.org/20100615161623.GM9869@baikonur.stro.at
 

Thread Tools




All times are GMT. The time now is 11:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org