getent will process numeric UIDs/GIDs for us. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- arch-tmpfiles | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch-tmpfiles b/arch-tmpfiles index a5eb535..723b6b7 100755 --- a/arch-tmpfiles +++ b/arch-tmpfiles @@ -25,12 +25,12 @@ checkparams() { fi # uid must be numeric or a valid user name - if [[ $uid && $uid != +([[:digit:]]) ]] && ! getent passwd "$uid" >/dev/null; then + if [[ $uid ]] && ! getent passwd "$uid" >/dev/null; then return 1 fi # gid must be numeric or a valid group name - if [[ $gid && $gid != +([[:digit:]]) ]] && ! getent group "$gid" >/dev/null; then + if [[ $gid ]] && ! getent group "$gid" >/dev/null; then return 1 fi -- 1.7.8.1