diff options
author | Michael Prokop <mika@debian.org> | 2016-07-02 10:42:01 +0200 |
---|---|---|
committer | Michael Prokop <mika@debian.org> | 2016-07-02 11:26:46 +0200 |
commit | 30dfbbd105c411329ad2e4e16da6eabf953db121 (patch) | |
tree | 89b18621b5d4d3e7412f6230f859d6e76f8a7ca5 | |
parent | b0a5f26a79a47df766d802a0fe96014ba4235989 (diff) |
mkinitramfs: consider *.conf files only, also from /lib/modprobe.d/ + don't complain about empty dirs
We should ignore dpkg backup files like
/etc/modprobe.d/pptpd.conf.dpkg-remove and since kmod cares only
about *.conf anyway just copy *.conf files.
While at it also support *.conf files from /lib/modprobe.d/.
Stop complaining about empty directy with
`cp: cannot stat '/etc/modprobe.d/*': No such file or directory`.
Thanks: Ben Hutchings <ben@decadent.org.uk> for reviewing
Closes: #829280
-rwxr-xr-x | mkinitramfs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mkinitramfs b/mkinitramfs index 27349ea..5056214 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -302,8 +302,12 @@ ln -s /proc/mounts "${DESTDIR}/etc/mtab" # module-init-tools copy_exec /sbin/modprobe /sbin copy_exec /sbin/rmmod /sbin -mkdir -p "${DESTDIR}/etc/modprobe.d" -cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/" +mkdir -p "${DESTDIR}/etc/modprobe.d" "${DESTDIR}/lib/modprobe.d" +for file in /etc/modprobe.d/*.conf /lib/modprobe.d/*.conf ; do + if test -e "$file" || test -L "$file" ; then + copy_file config "$file" + fi +done # workaround: libgcc always needed on old-abi arm if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then |