Re: VLAN support in rcNG [PATCH]

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Mon, 19 Apr 2004 00:02:29 +0300
On Sun, Apr 18, 2004 at 11:34:45AM -0700, Brooks Davis wrote:
> There is little or no complexity depending on how you solve the problem.
> My proposal was to let the kernel support <interface>_<tag> which would
> require no modifications to the rc system.  If you wanted to do it in
> the rc system, the equivalent of "tr . _" would have to be applied to
> the name before using the pseudo associative array lookup hack, that's
> it.  The only difficulty is that you have to do it without anything in
> /usr.
> 
Shell is quite a powerful tool:

foo=xl0_2
echo ${foo%_*}.${foo##*_}

This replaces the last underscore with a dot.


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Sun Apr 18 2004 - 12:02:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:51 UTC