small bug fix for arch linux, added fallback test for systemd version

This commit is contained in:
inxi-svn 2014-03-13 00:45:53 +00:00
parent e7ec0a9fea
commit 5ef2329092

7
inxi
View file

@ -5426,7 +5426,12 @@ get_init_data()
# more data may be needed for other init systems.
if [[ -e /proc/1/comm && -n $( grep -s 'systemd' /proc/1/comm ) ]];then
init_type='systemd'
init_version=$( get_de_app_version 'systemd' '^systemd' '2' )
if [[ -n $( type -p systemd ) ]];then
init_version=$( get_de_app_version 'systemd' '^systemd' '2' )
fi
if [[ -z $init_version && -n $( type -p systemctl )]];then
init_version=$( get_de_app_version 'systemctl' '^systemd' '2' )
fi
else
ls_run=$(ls /run)
# note: upstart-file-bridge.pid upstart-socket-bridge.pid upstart-udev-bridge.pid