summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-03-26 10:43:45 +0100
committerUlrich Müller <ulm@gentoo.org>2022-03-28 21:47:19 +0200
commit35c94832f16fa949ed7472e6b8ebe128ed333d3a (patch)
treece18a2cb7394e5456f24c72c3f43bb091d1c0041 /eclass
parentfcaps.eclass: Use arithmetic test for UID (diff)
downloadgentoo-35c94832f16fa949ed7472e6b8ebe128ed333d3a.tar.gz
gentoo-35c94832f16fa949ed7472e6b8ebe128ed333d3a.tar.bz2
gentoo-35c94832f16fa949ed7472e6b8ebe128ed333d3a.zip
user.eclass: Use arithmetic test for UID
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/user.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass
index 581704eae815..ff69be81c1ec 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -85,7 +85,7 @@ user_get_nologin() {
# If -M is passed, enewuser does not create the home directory if it does not
# exist.
enewuser() {
- if [[ ${EUID} != 0 ]] ; then
+ if [[ ${EUID} -ne 0 ]] ; then
ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
return 0
fi
@@ -240,7 +240,7 @@ enewuser() {
# If -F is passed, enewgroup will always enforce specified GID and fail if it
# can not be assigned.
enewgroup() {
- if [[ ${EUID} != 0 ]] ; then
+ if [[ ${EUID} -ne 0 ]] ; then
ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
return 0
fi