[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#544901: live-initramfs: noprompt boot parameter is ignored for usb flash drives



Package: live-initramfs
Severity: normal

Hi,

the init script does not take noprompt into account when running from
a USB flash drive: it still asks the user to remove the flash drive
before halting/rebooting.

(OT: this is especially annoying when using splashy, as the prompt is
hidden behind the splash screen and the user waits forever; I guess
I should try usplash, but well...)

The attached patch against current Git changes this behavior to what
should, IMHO, happen. I also updated the documentation.

-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (900, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-vserver-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash

--
  intrigeri <intrigeri@boum.org>
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr-fingerprint.asc
  | If you must label the absolute, use it's proper name: Temporary.

>From 3c2bfbc571bb91fe8b02b6355515138fa0b755f1 Mon Sep 17 00:00:00 2001
From: intrigeri <intrigeri@boum.org>
Date: Thu, 3 Sep 2009 18:22:50 +0200
Subject: [PATCH] take noprompt into account for USB flash drives as well

Signed-off-by: intrigeri <intrigeri@boum.org>
---
 debian/live-initramfs.init       |    3 ++-
 manpages/live-initramfs.en.7.txt |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/live-initramfs.init b/debian/live-initramfs.init
index 07f707c..320e02e 100644
--- a/debian/live-initramfs.init
+++ b/debian/live-initramfs.init
@@ -156,9 +156,10 @@ do_stop ()
 				eject -p -m /live/image >/dev/null 2>&1
 			fi
 
-			[ "$prompt" ] || return 0
 		fi
 
+		[ "$prompt" ] || return 0
+
 		stty sane < /dev/console
 
 		printf "\n\n${MESSAGE} and press ENTER to continue:" > /dev/console
diff --git a/manpages/live-initramfs.en.7.txt b/manpages/live-initramfs.en.7.txt
index b7ffa11..2439a85 100644
--- a/manpages/live-initramfs.en.7.txt
+++ b/manpages/live-initramfs.en.7.txt
@@ -190,7 +190,7 @@ been installed with persistent enabled.
 
   noprompt
 
-Do not prompt to eject the CD on reboot.
+Do not prompt to eject the CD or remove the USB flash drive on reboot.
 
   nosudo::
 
-- 
1.6.3.3


Reply to: