Make nxkeygen and nxsetup work when invoked as symlinks. https://bugzilla.redhat.com/616993 diff -up freenx-server-0.7.3/nxkeygen.nxpath freenx-server-0.7.3/nxkeygen --- freenx-server-0.7.3/nxkeygen.nxpath 2010-07-21 23:45:11.739315044 +0300 +++ freenx-server-0.7.3/nxkeygen 2010-07-21 23:47:15.171315008 +0300 @@ -16,7 +16,7 @@ # ======================================================================== # Read the config file -. $(PATH=$(cd $(dirname $0) && pwd):$PATH which nxloadconfig) -- +. $(PATH=$(dirname $(readlink -f $(type -P $0 || echo $0))):$PATH which nxloadconfig) -- [ -z "$NX_KEY_DIR" ] && NX_KEY_DIR="$NX_HOME_DIR/.ssh" DATE="`date '+%Y%m%d-%H%M%S'`" diff -up freenx-server-0.7.3/nxsetup.nxpath freenx-server-0.7.3/nxsetup --- freenx-server-0.7.3/nxsetup.nxpath 2008-03-11 01:01:03.000000000 +0200 +++ freenx-server-0.7.3/nxsetup 2010-07-21 23:47:25.699318736 +0300 @@ -137,7 +137,7 @@ parse_cmdline() parse_cmdline "$@" # Read the config file -. $(PATH=$(cd $(dirname $0) && pwd):$PATH which nxloadconfig) -- +. $(PATH=$(dirname $(readlink -f $(type -P $0 || echo $0))):$PATH which nxloadconfig) -- run_nscd() { @@ -380,7 +380,7 @@ test_nx() echo "" echo "----> Testing your nxserver configuration ..." [ "$IGNORE_ERRORS" = "yes" ] && NO_ERRORS="--ignore-errors" - . $(PATH=$(cd $(dirname $0) && pwd):$PATH which nxloadconfig) --check $NO_ERRORS + . $(PATH=$(dirname $(readlink -f $(type -P $0 || echo $0))):$PATH which nxloadconfig) --check $NO_ERRORS echo "<---- done" echo "" echo "----> Testing your nxserver connection ..."