diff options
author | Jeff Bailey <jbailey@ubuntu.com> | 2005-06-17 21:24:55 +0000 |
---|---|---|
committer | Jeff Bailey <jbailey@ubuntu.com> | 2005-06-17 21:24:55 +0000 |
commit | b22f2c7fc49c9874eb8f2df1d8b1fabec540cfb0 (patch) | |
tree | f57270e71f93eb59157744d6ce91c153ecf6507d /mkinitramfs | |
parent | 287dcae1407c303ee929d2bff0a49c1e721b05ae (diff) | |
download | initramfs-tools-b22f2c7fc49c9874eb8f2df1d8b1fabec540cfb0.tar.gz initramfs-tools-b22f2c7fc49c9874eb8f2df1d8b1fabec540cfb0.zip |
Make quieter, match mkinitrd interface, pull in dependencies for nfs and dhcp, document upstream repository location
Diffstat (limited to 'mkinitramfs')
-rw-r--r-- | mkinitramfs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mkinitramfs b/mkinitramfs index 078346f..8ef22c4 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -51,7 +51,7 @@ auto_add_modules() copy_modules_dir kernel/fs/xfs # These aren't caught by the above but really need to be there: - for x in mbcache; do + for x in mbcache nfs af_packet; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then @@ -116,7 +116,27 @@ if [ x${outfile} = x ] || [ ${#} -ne 1 ]; then usage fi +# And by "version" we really mean path to kernel modules +# This is braindead, and exists to preserve the interface with mkinitrd version=${1} +[ $# -gt 0 ] || unset version +case ${version} in +/lib/modules/*/[!/]*) + ;; +/lib/modules/[!/]*) + version=${version#/lib/modules/} + version=${version%%/*} + ;; +esac + +case ${version} in +*/*) + echo $PROG: ${version} is not a valid kernel version >&2 + exit 1 + ;; +esac + +version="${version-$(uname -r)}" if [ -d ${outfile} ]; then echo "${outfile} is a directory" |