:: Re: [DNG] Wifi device names: was sy…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Litt
Fecha:  
A: dng
Asunto: Re: [DNG] Wifi device names: was systemd is haunting me
On Mon, 01 Feb 2016 17:08:17 +0000
Rainer Weikusat <rainerweikusat@???> wrote:

> Steve Litt <slitt@???> writes:
> > On Sun, 31 Jan 2016 18:20:12 -0500
> > Steve Litt <slitt@???> wrote:
>
> [...]
>
> > ===========================================
> > #!/bin/sh
> > lineno=${1:-1}
> >
> > fn=`mktemp`
> >
> > ip -o link | \
> > cut -d ' ' -f2 | \
> > grep ^w | \
> > tr -d : > $fn
> >
> > maxdev=`wc -l $fn | cut -d ' ' -f 1`
> > if test $maxdev -lt $lineno; then
> >    echo =max$maxdev
> > else
> >   head $fn -n $lineno | \
> >   tail -n 1
> > fi
> > rm $fn
> > ===========================================  

>
> [...]
>
> > There are probably better ways to write this script, but I think the
> > way I have it here exhibits the behavior I'd like.
>
> 'Better' is often very much a matter of opinion but here's one which
> doesn't need a temporary file:
>
> ---------
> #!/bin/sh
> want=${1:-1}
> got=0
>
> for dev in `ip -o link | sed -n 's/[^:]*: *\(w[^:]*\).*/\1/p'`;
> do
>     got=`expr $got + 1`

>
>     test $got -eq $want && {
>     echo $dev
>     exit 0
>     }
> done

>
> echo =max$got



Hi Rainer,

At the start of this thread, I had put my contribution into the Public
Domain. Then you and I started incrementally improving it, so it's
pretty much a mashup of both our works.

I'd like to use it in a package of shellscripts I'll be releasing as
Free Software. For this particular shellscript written by both of us,
would it be OK with you if we licensed it under the Expat license?

http://directory.fsf.org/wiki/License:Expat

The preceding is basically a dup of the MIT license and some of the
later BSD licenses, but by calling it "Expat" we rule out various
versions and the like.

Is it OK with you to license it Expat? Is it OK with you if both our
names appear on the Copyright line? If so, is the exact correct
spelling of your name "Rainer Weikusat"?

Did anyone else substantially contribute in creating the shellscript to
derive the Wifi device name on systems with the new "predictable"
device names? If so, same questions to you.

Thanks,

SteveT

Steve Litt
February 2016 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key