base-files: supress errors from ldd
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 19 Nov 2014 12:17:37 +0000 (12:17 +0000)
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 19 Nov 2014 12:17:37 +0000 (12:17 +0000)
ldd might be called for shell scrips during sysupgrade, causing it to
complain that they are not a dynamic executables.

This is a harmless error, so supress it to avoid confusing about them
being serious ones.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43315 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/lib/upgrade/common.sh

index 9123359..f9b30a4 100644 (file)
@@ -3,7 +3,7 @@
 RAM_ROOT=/tmp/root
 
 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
-libs() { ldd $* | sed -r 's/(.* => )?(.*) .*/\2/'; }
+libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
 
 install_file() { # <file> [ <file> ... ]
        for file in "$@"; do