From: nico Date: Tue, 21 Apr 2009 01:10:21 +0000 (+0000) Subject: add a workaround to rstrip restoring exec perms when they got changed by sstrip X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=5c050e2e16f408163e564f28dddb1dda05f141cb add a workaround to rstrip restoring exec perms when they got changed by sstrip git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15312 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index 5efc86652..e42caa53a 100755 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -48,7 +48,10 @@ find $TARGETS -type f -a -exec file {} \; | \ [ "${S}" = "relocatable" ] && { eval "$STRIP_KMOD -w -K '__param*' -K '__mod*' $(find_modparams "$F")$F" } || { + b=$(stat -c '%a' $F) eval "$STRIP $F" + a=$(stat -c '%a' $F) + [ "$a" = "$b" ] || chmod $b $F } done true