mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Fix bug for systemd being installed but not PID 1
This commit is contained in:
parent
3bc2dda00d
commit
ad5ad3d1ad
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue