This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 8d33660aa24f885ba0de1a1297877d8c33c64b82 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Jun 24 16:45:08 2019 +0200 x2goserver/bin/x2gopath.in: output warning messages if directories do not exist. --- debian/changelog | 2 ++ x2goserver/bin/x2gopath.in | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index b89145b..f223b56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -133,6 +133,8 @@ x2goserver (4.1.0.4-0x2go1.1) UNRELEASED; urgency=medium - x2goserver/Makefile: fix shell quoting issue with newly exported ${DESTDIR} variable. - x2goserver/bin/x2gopath.in: more test -> [] conversion. + - x2goserver/bin/x2gopath.in: output warning messages if directories do + not exist. * debian/control: + Build-depend upon lsb-release for distro version detection. * debian/x2goserver.manpages: diff --git a/x2goserver/bin/x2gopath.in b/x2goserver/bin/x2gopath.in index 1a7edb9..8646a0e 100755 --- a/x2goserver/bin/x2gopath.in +++ b/x2goserver/bin/x2gopath.in @@ -46,13 +46,32 @@ if [ "${x2go_share_subdir}" = "${installed_sharedir}" ] || [ "${x2go_lib_subdir} printf 'WARNING: X2Go Server was built with a SHAREDIR (%s), LIBDIR (%s) or NXLIBDIR (%s) not starting with PREFIX (%s). Such a setup will likely not work correctly.\n' "${installed_sharedir}" "${installed_libdir}" "${installed_nxlibdir}" "${installed_prefix}" >&2 fi +# Hopefully helpful diagnostic messages. +typeset x2go_libpath="${base}/${x2go_lib_subdir}" +typeset x2go_sharepath="${base}/${x2go_share_subdir}" +typeset x2go_nxx11path="${base}/${x2go_nxlib_subdir}/X11" +typeset x2go_xineramapath="${base}/${x2go_nxlib_subdir}/X11/Xinerama" +typeset -a desc_arr +typeset -a val_arr +desc_arr=( 'library path' 'share path' 'nx-X11 path' 'xinerama path' ) +val_arr=( 'x2go_libpath' 'x2go_sharepath' 'x2go_nxx11path' 'x2go_xineramapath' ) + +typeset -i i='0' +for i in "${!desc_arr[@]}"; do + if [ ! -e "${!val_arr[i]}" ]; then + printf 'WARNING: determined X2Go %s (%s) does not exist. Such a setup will likely not work correctly.\n' "${desc_arr[i]}" "${!val_arr[i]}" + elif [ ! -d "${!val_arr[i]}" ]; then + printf 'WARNING: determined X2Go %s (%s) exists, but is not a directory. Such a setup will likely not work correctly.\n' "${desc_arr[i]}" "${!val_arr[i]}" + fi +done + # Distributions should not modify the following section, but rather build the package with their custom PREFIX, LIBDIR, SHAREDIR etc. values. case "${1}" in ('base') printf '%s' "${base}";; - ('lib'|'libexec') printf '%s' "${base}/${x2go_lib_subdir}";; - ('share') printf '%s' "${base}/${x2go_share_subdir}";; - ('nx-x11') printf '%s' "${base}/${x2go_nxlib_subdir}/X11";; - ('xinerama') printf '%s' "${base}/${x2go_nxlib_subdir}/X11/Xinerama";; + ('lib'|'libexec') printf '%s' "${x2go_libpath}";; + ('share') printf '%s' "${x2go_sharepath}";; + ('nx-x11') printf '%s' "${x2go_nxx11path}";; + ('xinerama') printf '%s' "${x2go_xineramapath}";; (*) exit 1;; esac; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git