Commit 1d8df3d 1 parent feaad23 commit 1d8df3d Copy full SHA for 1d8df3d
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ function main {
32
32
function check_doas {
33
33
# doas will be necessary for now since i don't really know how to
34
34
# work with namespaces in Linux for chroot'ing without root rights
35
- if $( grep " $USER " " $DOAS_CONF " & > /dev/null) ; then
35
+ if $( grep " $( whoami ) " " $DOAS_CONF " & > /dev/null) ; then
36
36
function elevate { doas -- " $@ " ; }
37
37
export -f elevate
38
38
return
39
39
elif [ $UID == 0 ]; then
40
40
printerr ' Warning: running as root. This isn' \' ' t recommended.'
41
- elif $( id -nG $USER | grep ' wheel' ) ; then
41
+ elif $( groups $( whoami ) | grep ' wheel' ) ; then
42
42
printerr ' Warning: %s can log directly as root, although using doas is better.' \
43
- " $USER "
43
+ " $( whoami ) "
44
44
function elevate { su -c " $@ " ; }
45
45
export -f elevate
46
46
else
You can’t perform that action at this time.
0 commit comments