[pkg-cryptsetup-devel] [PATCH 2/2] cryptopensc-hook: fix installing drivers with their dependencies

Andreas Oberritter obi at saftware.de
Wed May 31 21:26:52 UTC 2017


---
 debian/initramfs/cryptopensc-hook | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/debian/initramfs/cryptopensc-hook b/debian/initramfs/cryptopensc-hook
index 6aa30bb..a8b0b18 100644
--- a/debian/initramfs/cryptopensc-hook
+++ b/debian/initramfs/cryptopensc-hook
@@ -51,8 +51,20 @@ done
 # Install pcscd daemon, drivers, conf file, and include libgcc as well since
 # pcscd utilizes pthread_cancel
 copy_exec /usr/sbin/pcscd
-cp -r /usr/lib/pcsc ${DESTDIR}/usr/lib
-cp /etc/reader.conf ${DESTDIR}/etc
+for file in $(find /usr/lib/pcsc -type f -name "*.so"); do
+    copy_exec "$file"
+done
+for file in $(find /usr/lib/pcsc ! -type d ! -name "*.so"); do
+    copy_file config "$file"
+done
+if [ -e /etc/reader.conf ]; then
+    copy_file config /etc/reader.conf
+fi
+if [ -d /etc/reader.conf.d ]; then
+    for file in /etc/reader.conf.d/*; do
+        copy_file config "$file"
+    done
+fi
 
 # Install opensc commands and conf file
 copy_exec /usr/bin/opensc-tool
-- 
2.11.0




More information about the pkg-cryptsetup-devel mailing list