From 6efdfd0e7af884c916569393f9c8bb1f2aa959cb Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 17 Jun 2013 03:15:02 +0200 Subject: [PATCH] Check write perms in sys/ldconfig.sh --- sys/ldconfig.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/ldconfig.sh b/sys/ldconfig.sh index a42822836c..dc397c5ad7 100755 --- a/sys/ldconfig.sh +++ b/sys/ldconfig.sh @@ -1,8 +1,10 @@ #!/bin/sh LD=/etc/ld.so.conf.d -type ldconfig > /dev/null 2>&1 -if [ $? = 0 ]; then - mkdir -p $LD - awk -F= '/^LIBDIR/{print $2}' config-user.mk > $LD/radare.conf - ldconfig +if test -w $LD ; then + if type ldconfig > /dev/null 2>&1 ; then + mkdir -p $LD + awk -F= '/^LIBDIR/{print $2}' config-user.mk > $LD/radare.conf + ldconfig + fi fi +exit 0