mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-27 05:01:41 +02:00
Pkg test: refactor for readability
This commit is contained in:
parent
ead31ae2e7
commit
9eb9664bcf
@ -1,14 +1,13 @@
|
|||||||
detect_libnss_wrapper() {
|
detect_libnss_wrapper() {
|
||||||
if $(which dpkg &>/dev/null); then
|
if $(which dpkg &>/dev/null); then
|
||||||
libnss_wrapper_file=$(dpkg -S libnss_wrapper.so | awk -F' ' '{ print $2 }')
|
libnss_wrapper_file=$(dpkg -S libnss_wrapper.so | awk -F' ' '{ print $2 }')
|
||||||
LD_PRELOAD="$libnss_wrapper_file"
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r /usr/lib/libnss_wrapper.so ]; then
|
if [ -r /usr/lib/libnss_wrapper.so ]; then
|
||||||
LD_PRELOAD=/usr/lib/libnss_wrapper.so
|
libnss_wrapper_file=/usr/lib/libnss_wrapper.so
|
||||||
elif [ -r /usr/lib64/libnss_wrapper.so ]; then
|
elif [ -r /usr/lib64/libnss_wrapper.so ]; then
|
||||||
LD_PRELOAD=/usr/lib64/libnss_wrapper.so
|
libnss_wrapper_file=/usr/lib64/libnss_wrapper.so
|
||||||
else
|
else
|
||||||
echo "no libnss_wrapper.so installed!"
|
echo "no libnss_wrapper.so installed!"
|
||||||
exit 1
|
exit 1
|
||||||
@ -42,6 +41,6 @@ if [ x"$USER_ID" != x"0" ]; then
|
|||||||
export NSS_WRAPPER_GROUP
|
export NSS_WRAPPER_GROUP
|
||||||
|
|
||||||
detect_libnss_wrapper
|
detect_libnss_wrapper
|
||||||
echo "nss_wrapper location: $LD_PRELOAD"
|
echo "nss_wrapper location: $libnss_wrapper_file"
|
||||||
export LD_PRELOAD
|
export LD_PRELOAD="$libnss_wrapper_file"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user