From 04fa1ab4d3a8ea0e94967fc16f4b2148c34f8c0c Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Fri, 16 Sep 2011 19:08:21 +0200 Subject: [PATCH] squashfs/build.sh: changed to not remove empty directories and to not remove broken symlinks --- target/share/squashfs/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/share/squashfs/build.sh b/target/share/squashfs/build.sh index 7cb1d55..a43fd3a 100644 --- a/target/share/squashfs/build.sh +++ b/target/share/squashfs/build.sh @@ -68,6 +68,7 @@ done # remove empty directories, use $SQUASHFS_EMPTY_PATTERN to skip directories # +empty_dir() { echo_status "Removing empty directories ..." ( cd "$rootfs"; find . -type d ) | tac | eval "sed -e '/\.\/\(dev\|sys\|proc\|mnt\|srv\|tmp\|root\|var\)\(\|\/.*\)$/d;' $SQUASHFS_EMPTY_PATTERN" | while read folder; do count=$( find "$rootfs/$folder" | wc -l ) @@ -77,7 +78,9 @@ echo_status "Removing empty directories ..." # echo_status "- ${folder} deleted." fi done +} +check_symlinks() { echo_status "Checking for broken symlinks ..." ( cd "$rootfs"; find . -type l | cut -c2- ) | while read link; do x="$link" @@ -107,6 +110,7 @@ echo_status "Checking for broken symlinks ..." rm -f "$rootfs$link" fi done +} # ldconfig #