Fix bug for systemd being installed but not PID 1

This commit is contained in:
Cameron Norman 2014-05-13 12:44:55 -07:00 committed by David Adam
parent 3bc2dda00d
commit ad5ad3d1ad

View file

@ -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