From 3790c6345a60150b0582a1264a3e0e6895294126 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 26 Aug 2013 19:37:19 +0200 Subject: [PATCH] initrd.scripts: wrap >80 chars lines in devicelist() --- defaults/initrd.scripts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 78deda1..c1b193f 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -334,9 +334,13 @@ devicelist() { DEVICES="$DEVICES /dev/iseries/vcd*" # builtin mmc/sd card reader devices DEVICES="$DEVICES /dev/mmcblk* /dev/mmcblk*/*" + # fallback scanning, this might scan something twice, but it's better than # failing to boot. - [ -e /proc/partitions ] && DEVICES="${DEVICES} $(awk '/([0-9]+[[:space:]]+)/{print "/dev/" $4}' /proc/partitions)" + local parts=$(awk '/([0-9]+[[:space:]]+)/{print "/dev/" $4}' \ + /proc/partitions) + [ -e /proc/partitions ] && DEVICES="${DEVICES} ${parts}" + echo ${DEVICES} }