Subject: Re: "eval" in rc.d/network
To: None <netbsd-users@netbsd.org>
From: Hal Snyder <hal@vailsys.com>
List: netbsd-users
Date: 09/14/2000 12:52:15
"Henry B. Hotz" <hotz@jpl.nasa.gov> writes:

> At 1:29 AM +0900 9/15/00, itojun@iijlab.net wrote:
> > >Perhaps
> > >	while read args; do
> > >	case "$args" in
> > >		'')	;;
> > >		'#'*)	;;
> > >		*)	ifconfig $int $args ;;
> > >	esac; done </etc/ifconfig.$int
> > >would work more clearly ("read" already strips leading whitespace).
> > >Trailing comments on a line containing ifconfig args have never been
> > >handled, so there's no need to start now.
> >
> >	which one (eval or case) do people like better?  i'll test "case"
> >	variant locally.
> 
> I think the 'case' case is clearer.  The 'eval' case seems confusing
> to me.  That's what started this discussion after all.

Agreed, 'case' is clearer.

FWIW, it's rather handy what OpenBSD does with /etc/hostname.if -
allowing !<shell-command> along with ifconfig specs. Good for adding
static routing rules at the right time in startup, for example. Or has
this been discussed already?