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

Dimitry Andric dim at FreeBSD.org
Wed Sep 8 07:10:04 UTC 2010


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


More information about the freebsd-rc mailing list