Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#24356 - [initscripts] rc.d arguments should have another order
Attached to Project:
Arch Linux
Opened by Filipp Andjelo (scorp) - Friday, 20 May 2011, 07:38 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 24 May 2011, 20:44 GMT
Opened by Filipp Andjelo (scorp) - Friday, 20 May 2011, 07:38 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 24 May 2011, 20:44 GMT
|
DetailsDescription:
I've decided to write and commit the bash_completion for newly added /sbin/rc.d script. It works good for default initscript actions like start|stop|restart, but many initscripts have their own actions, like force-restart or reload. Some of the scripts, f.e. network, has even actions with additional arguments, like 'ifup eth0', which would not work with current version of rc.d Back to the bash_completion, the order of rc.d arguments is not good for it. If you type rc.d and call completion you want to see all of possible actions, for which you have to search all of the initscripts first (it goes very slow). A better solution would be to have a name of the initscript first and than the actions and arguments following. This way you can find very fast which actions are now possible for desired iniscript. You could f.e. even filter-out the start action if the daemon is already started, or the same for the stop. Since rc.d is very new, it is still not too late to make some changes yet. My suggestion is, rc.d should have following usage: rc.d [--list|--help] <daemon> <action> ... Write please if you agree with this solution, then I would commit the patches with a new rc.d script and accordant bash_completion. We should also fix the scripts, which are already using rc.d, if any. Additional info: * initscripts 2011.05.2-1 |
This task depends upon
Closed by Tom Gundersen (tomegun)
Tuesday, 24 May 2011, 20:44 GMT
Reason for closing: Won't implement
Tuesday, 24 May 2011, 20:44 GMT
Reason for closing: Won't implement
As I said /etc/rc.d/network is such one, it has action arguments, f.e. /etc/rc.d/network ifup eth0
If you going to use it with current rc.d it would fail: rc.d ifup eth0 network, since eth0 is unknown daemon.
I can commit bash_completion now for default {start|stop|restart} actions with "already running" lookup. I've already implemented the lookup for possible actions too, but it is killing performance like hell. Pleas take a look.
as you can imagine the choice of the arguments was not done at random.
it was inspired by what is happening elsewhere. systemctl and invoke-rc.d.
I also think it's better like that