On Wed, Jun 3, 2020 at 6:21 PM Stan Grishin <[email protected]> wrote:
> To obtain the list of enabled (for autostart) services, you'd type > service list-enabled. For disabled services service list-disabled. It > is useful when you need to quickly check which services are > enabled/disabled or when helping other users troubleshoot. > > An alternative to list-enabled/list-disabled that I have considered > was to output the enabled status of available services below the usage > output, ie replace: > if [ -n "$1" ]; then > echo "service "'"'"$1"'"'" not found, the > following services are available:" > ls "/etc/init.d" > fi > > with > > if [ -n "$1" ]; then > echo "service "'"'"$1"'"'" not found, the > following services are available:" > for F in /etc/init.d/* ; do > $F enabled && echo "$F (autostart enabled)" || > echo "$F (autostart **disabled**)" > done; > fi > > > Please elaborate on the list-start and list-stop question, I'm not > sure I understand the purpose of those. > Originally I asked that question because I misunderstood what the goal of this change was. I thought that you were proposing to add the ability to enable / disable multiple services at the same time, so I was asking about the ability to start / stop multiple services at the same time. It's clear not that's not what you were trying to propose. So instead, what about listing the services that are running, and also listing the services that are configured, but not running? I don't know that that provides a lot of value, so it may not be worth doing.
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
