Replace pidof with pgrep to have regex

This commit is contained in:
Jeremy Gardais 2023-08-30 17:23:42 +02:00
parent 93ea90bfd5
commit a5474bd976
Signed by: jegardai
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 # no ~/.noxorg file exist
if [ -z "${SSH_TTY}" ] && if [ -z "${SSH_TTY}" ] &&
[ ! -f "${HOME}/.noxorg" ] && [ ! -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]" echo "Aucune session X11 détectée, voulez vous en lancer une ? [O|n]"
getc start_x getc start_x
if [ `echo "$start_x" | grep "n"` ];then if [ `echo "$start_x" | grep "n"` ];then