From: Tamas Pal <folti@balabit.hu> Force using OS's own uname implementation, over whatewer found in PATH. Die with error on an unsupported system or uname error. Signed-off-by: Tamas Pal <folti@balabit.hu> --- scl/system/generate-system-source.sh | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/scl/system/generate-system-source.sh b/scl/system/generate-system-source.sh index d89fd33..6f5af70 100755 --- a/scl/system/generate-system-source.sh +++ b/scl/system/generate-system-source.sh @@ -23,6 +23,14 @@ # ############################################################################# +# DO NOT REMOVE!!! +# We have to force the script to use the OS's own utilities, instead of some +# random stuff found in path. This is needed when PATH points to a uname binary +# with some missing dependencies, due to LD_LIBRARY_PATH/LIBPATH settings. In those case, it's possible, that uname doesn't work... +PATH=/bin:/usr/bin:$PATH +LIBPATH= +LD_LIBRARY_PATH= +export PATH LIBPATH LD_LIBRARY_PATH os=${UNAME_S:-`uname -s`} osversion=${UNAME_R:-`uname -r`} @@ -69,4 +77,9 @@ EOF unix-dgram("/dev/log"); EOF ;; + *) + # need to notify the user that something gone terribly wrong... + echo "$0: FATAL: unsupported OS ($os) or uname(1) error. Please call BalaBit's support" >&2 + exit 1 + ;; esac -- 1.7.2.5