mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Fix bug for systemd being installed but not PID 1
This commit is contained in:
parent
3bc2dda00d
commit
ad5ad3d1ad
@ -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…
x
Reference in New Issue
Block a user