From ad5ad3d1ad9aa6586f235082edcdd5c636a5fad6 Mon Sep 17 00:00:00 2001 From: Cameron Norman Date: Tue, 13 May 2014 12:44:55 -0700 Subject: [PATCH] Fix bug for systemd being installed but not PID 1 --- share/functions/__fish_print_service_names.fish | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/functions/__fish_print_service_names.fish b/share/functions/__fish_print_service_names.fish index 3eeb00155..45d653a76 100644 --- a/share/functions/__fish_print_service_names.fish +++ b/share/functions/__fish_print_service_names.fish @@ -1,5 +1,5 @@ function __fish_print_service_names -d 'All services known to the system' - if type -f systemctl >/dev/null + if test -d /run/systemd/system command systemctl list-units -t service | cut -d ' ' -f 1 | grep '\.service$' | sed -e 's/\.service$//' else if type -f rc-service command rc-service -l @@ -7,4 +7,3 @@ function __fish_print_service_names -d 'All services known to the system' command ls /etc/init.d end end -