X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Fensc_pathprog.m4;h=cd99634614a948bed97c602197757e84ecb4375c;hb=e56e7eebefd18c80abf0e533f3cbdd9c1c22e700;hp=1678a74d034d84584582fec32d28f78f8e9f78a3;hpb=28f2941c7781b494b9a47d71d56317b2ee8940d6;p=util-vserver.git diff --git a/m4/ensc_pathprog.m4 b/m4/ensc_pathprog.m4 index 1678a74..cd99634 100644 --- a/m4/ensc_pathprog.m4 +++ b/m4/ensc_pathprog.m4 @@ -60,9 +60,13 @@ $4]) fi if test "x$5" = x; then - if test -h "${$1}"; then - $1=`readlink -f "${$1}"` - fi + ensc_pathprog_path="${$1}" + while test -h "$ensc_pathprog_path"; do + case "$ensc_pathprog_path" in + ../*) $1=`readlink -f "${$1}"`; break ;; + esac + ensc_pathprog_path=`readlink "$ensc_pathprog_path"` + done fi test "${$1}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'$1'@!${$1}!g;"