Replace pidof with pgrep to have regex

This commit is contained in:
gardouille 2023-08-30 17:23:42 +02:00
parent 93ea90bfd5
commit a5474bd976
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 1 additions and 1 deletions

2
zlogin
View File

@ -64,7 +64,7 @@ if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
# no ~/.noxorg file exist
if [ -z "${SSH_TTY}" ] &&
[ ! -f "${HOME}/.noxorg" ] &&
! pidof "/usr/lib/xorg/Xorg" ; then
! pgrep --full -- "/usr/lib/xorg/Xorg|/usr/lib/Xorg" ; then
echo "Aucune session X11 détectée, voulez vous en lancer une ? [O|n]"
getc start_x
if [ `echo "$start_x" | grep "n"` ];then