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 > \fB\fI 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-
Attachment:
signature.asc
Description: Digital signature