Fixing cache_path: cache non-executable libs dependencies as well.
authorTails developers <amnesia@boum.org>
Sat, 8 Jan 2011 17:09:01 +0000 (18:09 +0100)
committerTails developers <amnesia@boum.org>
Wed, 7 Sep 2011 11:55:27 +0000 (13:55 +0200)
Most shared libraries are not executable and nevertheless depend on other shared
libraries. These dependencies must be cached as well.

debian/live-boot.init

index cd2e4cd..1130730 100644 (file)
@@ -47,15 +47,12 @@ cache_path()
                find "${path}" -type f | xargs cat > /dev/null 2>&1
        elif [ -f "${path}" ]
        then
-               if [ -x "${path}" ]
+               if file -L "${path}" | grep -q 'dynamically linked'
                then
-                       if file -L "${path}" | grep -q 'dynamically linked'
-                       then
-                               for lib in $(ldd "${path}" | awk '{ print $3 }')
-                               do
-                                       cache_path "${lib}"
-                               done
-                       fi
+                       for lib in $(ldd "${path}" | awk '{ print $3 }')
+                       do
+                               cache_path "${lib}"
+                       done
                fi
 
                cat "${path}" >/dev/null 2>&1