From 5ef23290925de4c992aaa5a57312c3cfac186b10 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 13 Mar 2014 00:45:53 +0000 Subject: [PATCH] small bug fix for arch linux, added fallback test for systemd version --- inxi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index 26710e9..f4eb6a8 100755 --- a/inxi +++ b/inxi @@ -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