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