mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 18:12:21 +00:00
small code cleanup, future proofing dm ids
This commit is contained in:
parent
ff7968377a
commit
358988f801
3
inxi
3
inxi
|
@ -4866,7 +4866,8 @@ get_display_manager()
|
||||||
for dm_id in $dm_id_list
|
for dm_id in $dm_id_list
|
||||||
do
|
do
|
||||||
# note: ${dm_id%.*}/$dm_id will create a dir name out of the dm id, then test if pid is in that
|
# note: ${dm_id%.*}/$dm_id will create a dir name out of the dm id, then test if pid is in that
|
||||||
if [[ -f /run/$dm_id || -f /run/${dm_id%.*}/$dm_id || -f /var/run/$dm_id ]];then
|
if [[ -f /run/$dm_id || -f /run/${dm_id%.*}/$dm_id || -f /var/run/$dm_id || \
|
||||||
|
-f /var/run/${dm_id%.*}/$dm_id ]];then
|
||||||
# just on the off chance that two dms are running, good info to have in that case, if possible
|
# just on the off chance that two dms are running, good info to have in that case, if possible
|
||||||
dm=$dm$separator${dm_id%.*}
|
dm=$dm$separator${dm_id%.*}
|
||||||
separator=','
|
separator=','
|
||||||
|
|
Loading…
Reference in a new issue