1 |
commit: 34ede2f61724b2931f4edc7af81129d1af421c62 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 26 09:45:17 2022 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 28 19:47:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34ede2f6 |
7 |
|
8 |
acct-user.eclass: Use arithmetic test for EUID |
9 |
|
10 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
11 |
|
12 |
eclass/acct-user.eclass | 12 ++++++------ |
13 |
1 file changed, 6 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass |
16 |
index 70ae2434b5df..2e2e1152f9ad 100644 |
17 |
--- a/eclass/acct-user.eclass |
18 |
+++ b/eclass/acct-user.eclass |
19 |
@@ -1,4 +1,4 @@ |
20 |
-# Copyright 2019-2021 Gentoo Authors |
21 |
+# Copyright 2019-2022 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
# @ECLASS: acct-user.eclass |
25 |
@@ -178,7 +178,7 @@ acct-user_add_deps() { |
26 |
eislocked() { |
27 |
[[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>" |
28 |
|
29 |
- if [[ ${EUID} != 0 ]]; then |
30 |
+ if [[ ${EUID} -ne 0 ]]; then |
31 |
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
32 |
return 0 |
33 |
fi |
34 |
@@ -215,7 +215,7 @@ eislocked() { |
35 |
elockuser() { |
36 |
[[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>" |
37 |
|
38 |
- if [[ ${EUID} != 0 ]]; then |
39 |
+ if [[ ${EUID} -ne 0 ]]; then |
40 |
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
41 |
return 0 |
42 |
fi |
43 |
@@ -258,7 +258,7 @@ elockuser() { |
44 |
eunlockuser() { |
45 |
[[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>" |
46 |
|
47 |
- if [[ ${EUID} != 0 ]]; then |
48 |
+ if [[ ${EUID} -ne 0 ]]; then |
49 |
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
50 |
return 0 |
51 |
fi |
52 |
@@ -440,7 +440,7 @@ acct-user_pkg_preinst() { |
53 |
acct-user_pkg_postinst() { |
54 |
debug-print-function ${FUNCNAME} "${@}" |
55 |
|
56 |
- if [[ ${EUID} != 0 ]]; then |
57 |
+ if [[ ${EUID} -ne 0 ]]; then |
58 |
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
59 |
return 0 |
60 |
fi |
61 |
@@ -468,7 +468,7 @@ acct-user_pkg_postinst() { |
62 |
acct-user_pkg_prerm() { |
63 |
debug-print-function ${FUNCNAME} "${@}" |
64 |
|
65 |
- if [[ ${EUID} != 0 ]]; then |
66 |
+ if [[ ${EUID} -ne 0 ]]; then |
67 |
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
68 |
return 0 |
69 |
fi |