small code cleanup, future proofing dm ids

This commit is contained in:
inxi-svn 2014-11-04 03:55:30 +00:00
parent ff7968377a
commit 358988f801

3
inxi
View file

@ -4866,7 +4866,8 @@ get_display_manager()
for dm_id in $dm_id_list
do
# 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
dm=$dm$separator${dm_id%.*}
separator=','