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

[PATCH initramfs-tools 2/4] scripts/functions: Use more sensible modprobe options at break=top



Use -a to load everything in one command.

Use -q rather than -v when quiet=y.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 scripts/functions | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/scripts/functions b/scripts/functions
index 2156ce5..f549ba4 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -57,14 +57,13 @@ maybe_break()
 	*,$1,*)
 		if [ "$1" = "top" ]; then
 			# udev is not yet running, so load keyboard drivers
-			modprobe -v i8042 || true
-			modprobe -v atkbd || true
-			modprobe -v ehci-pci || true
-			modprobe -v ehci-orion || true
-			modprobe -v ehci-hcd || true
-			modprobe -v uhci-hcd || true
-			modprobe -v ohci-hcd || true
-			modprobe -v usbhid || true
+			if [ "${quiet}" = "y" ]; then
+				opts="-q"
+			else
+				opts="-v"
+			fi
+			modprobe ${opts} -a i8042 atkbd ehci-pci ehci-orion \
+				 ehci-hcd uhci-hcd ohci-hcd usbhid
 		fi
 		panic "Spawning shell within the initramfs"
 		;;

Attachment: signature.asc
Description: Digital signature


Reply to: