autofs: shellcheck fixes

This commit is contained in:
Timo Makinen 2022-10-29 17:23:33 +00:00
parent 60ba593c17
commit f106fbe0b0

View file

@ -1,7 +1,8 @@
if [ $UID -gt 999 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
# shellcheck shell=sh
if [ "$(id -u)" -gt 999 ] && [ "$(id -gn)" = "$(id -un)" ]; then
if [ -z "$XDG_RUNTIME_DIR" ]; then
if [ -d "/run/user/${UID}" ]; then
XDG_RUNTIME_DIR="/run/user/${UID}"
if [ -d "/run/user/$(id -u)" ]; then
XDG_RUNTIME_DIR="/run/user/$(id -u)"
else
XDG_RUNTIME_DIR="$HOME"
fi