Remove the only use of printf in /etc/rc.d

M. Warner Losh imp at bsdimp.com
Wed Sep 8 13:43:27 UTC 2010


In message: <4C8736CA.9050200 at FreeBSD.org>
            Dimitry Andric <dim at freebsd.org> writes:
: On 2010-09-08 02:02, M. Warner Losh wrote:
: > Comments on the following patch?
: >
: > Warner
: >
: > Index: nsswitch
: > ===================================================================
: > --- nsswitch	(revision 211943)
: > +++ nsswitch	(working copy)
: > @@ -80,7 +80,7 @@
: >   	cache | *=*)
: >   		;;
: >   	*)
: > -		printf "Warning: unrecognized source [%s]\n" $_s>&2
: > +		echo "Warning: unrecognized source [$_s]">&2
: 
: Indeed, printf seems to be unnecessary here.  It looks like it snuck
: in,
: when somebody converted from a bit of inline awk scripting to plain
: sh:
: 
: http://svn.freebsd.org/viewvc/base/head/etc/rc.d/nsswitch?view=diff&r1=156916&r2=156917

Yea, that's my read too...  It is either extremely subtle, or an oops.

Warner



More information about the freebsd-rc mailing list