[review request] usr.sbin/service - make showing files
bryan at shatow.net
Mon May 14 13:35:32 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
On 5/13/2012 6:15 PM, Doug Barton wrote:
> On 5/12/2012 8:23 PM, Bryan Drewery wrote:
>> I found service(8) to be inconsistent that it listed files with `service
>> -e`, but plain services with `service -l`
> That behavior is by design.
Could you please elaborate on the design decision?
I did of course look in base for uses of service -e and service -l,
before considering this patch. The only case I can find is in a cshrc
example, which my patch does not affect.
I had expected service -e to behave like service -l, so I could for
example, put it into a loop and check all services, using the service(8)
for service_name in `service -e`; do service status $service_name ||
service start $service_name; done
Of course this doesn't work as -e returns files.
/etc/rc.d/ntpd does not exist in /etc/rc.d or the local startup
This may be a poor example, but it's something I tried and was surprised
by not working.
My patch allows for the old behavior of listing the file, but improves
it so now -e -l and -r all support showing files by specifying -F, while
without, it just lists the service names.
I consider this change to be fairly trivial since -e doesn't appear to
be used anywhere currently.
> Thanks for your interest,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the freebsd-current