aboutsummaryrefslogtreecommitdiff
path: root/arch-tmpfiles
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-12-24 23:45:14 -0500
committerDave Reisner <dreisner@archlinux.org>2011-12-26 10:17:44 -0500
commita4558c4c7c44714e16e42f6e76e947bde16c85e5 (patch)
tree7367bd75c2bc15171c215d3369fa797c18cb25a0 /arch-tmpfiles
parent5fa0e11c6193a627918f83ff43f931fdfdff59bc (diff)
downloadinitscripts-a4558c4c7c44714e16e42f6e76e947bde16c85e5.tar.xz
arch-tmpfiles: simplify uid/gid validation
getent will process numeric UIDs/GIDs for us. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'arch-tmpfiles')
-rwxr-xr-xarch-tmpfiles4
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