Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grml-zshrc: provide native systemd support in Start/Stop/... functions and cmdline completion #125

Open
mika opened this issue Sep 15, 2021 · 6 comments

Comments

@mika
Copy link
Member

mika commented Sep 15, 2021

Our __start_stop function, which is used as helper function within our Start, Stop, Restart,... functions doesn't provide native support for systemd. While usage of service still works, it would be nice if we could support systemctl usage.

Also our _grmlinitd function doesn't complete systemd unit files, but only init scripts. This means that e.g. Start N<tab> doesn't detect/complete NetworkManager.service, as the network-manager Debian package ships a systemd unit file but not an init script.

@evgeni
Copy link
Member

evgeni commented Sep 15, 2021

Are you aiming at supporting both, or only systemd?

@mika
Copy link
Member Author

mika commented Sep 15, 2021

I don't have any intentions to drop sysv-rc/init-script support :)

@mika
Copy link
Member Author

mika commented Sep 15, 2021

@evgeni care to elaborate? :) Is there any drawback, if we still support init scripts?

@evgeni
Copy link
Member

evgeni commented Sep 15, 2021

More code with IMHO zero benefit, unless you intend to run with something else than systemd as pid 1.

@evgeni
Copy link
Member

evgeni commented Sep 15, 2021

Actually, it makes things even more complicated. If you have systemd with sysv-generator enabled, you get a unit file per sysv init script, and your completion would show both, unless you deduplicate somehow. And if you have sysv-generator disabled, you get completion for scripts that can't be run.

@mika
Copy link
Member Author

mika commented Sep 15, 2021

Alright, I'll look into it and see what we could do, thanks for your prompt (nice word-play! :)) feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants