Override maybe_break from initramfs-tools.
authorMarco Amadori <amadorim@vdavda.com>
Tue, 16 Sep 2008 10:11:41 +0000 (12:11 +0200)
committerMarco Amadori <amadorim@vdavda.com>
Tue, 16 Sep 2008 10:19:15 +0000 (12:19 +0200)
* "break=<phase>" boot option, previously lead to the overrided panic
  function which shows a huge bug message info, which in that particular
  case is misleading, since the "dropping to a shell" is wanted.

Signed-off-by: Marco Amadori <amadorim@vdavda.com>
scripts/live-functions

index 49b4a3a..d19b0d5 100644 (file)
@@ -60,6 +60,16 @@ lang2locale() {
        fi
 }
 
+# Override maybe_break from scripts/functions
+maybe_break()
+{
+       if [ "${break}" = "$1" ]; then
+               # Call original panic
+               . /scripts/functions
+               panic "Spawning shell within the initramfs"
+       fi
+}
+
 # Override panic from scripts/functions
 panic() {