Web lists-archives.com

Re: ifconfig/ ifupdown/ ip -




On Mon, Jul 09, 2018 at 09:32:31AM -0400, Greg Wooledge wrote:
> On Mon, Jul 09, 2018 at 11:20:20PM +1000, Zenaan Harkness wrote:
> > configured to say office, I want to be able to run my reset bash
> > script as follows:
> > 
> >  reset eth0=internet
> 
> I suggest you choose a different name, as reset(1) is already taken.

Ack.


> If your script is supposed to take two pieces of information, I would
> suggest that you pass them as two separate arguments, rather than one
> argument with '=' in the middle of it.  That said, parsing foo=bar is
> not terribly hard, so you *could* do it this way... but it's not the
> way I would choose.

In general yes I agree, but in this case, I allow for multiple eth
devices to be reset with a single call of the script, so parse each
pair if needed (since not all device types have the mappings, in my
setup, only some).

Thanks again,