Permalink
Browse files

lsinitramfs: dont assume the image has modules

  • Loading branch information...
1 parent 6fd3873 commit 21b3ec9c33230863ffd6ada874b6eaf1e4a29bc8 @falconindy committed May 16, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 lsinitramfs
View
@@ -137,13 +137,15 @@ if (( analyze )); then
fi
printf '\n'
- printf '==> Included modules:\n'
- for mod in "${modules[@]}"; do
- printf ' %s' "$mod"
- in_array "${mod//_/-}" "${explicitmod[@]//_/-}" && printf ' [explicit]'
+ if (( ${#modules[*]} )); then
+ printf '==> Included modules:\n'
+ for mod in "${modules[@]}"; do
+ printf ' %s' "$mod"
+ in_array "${mod//_/-}" "${explicitmod[@]//_/-}" && printf ' [explicit]'
+ printf '\n'
+ done
printf '\n'
- done
- printf '\n'
+ fi
printf '==> Included binaries:\n'
printf ' %s\n' "${binaries[@]}"

0 comments on commit 21b3ec9

Please sign in to comment.