Re: [DNG] Wifi device names: was systemd is haunting me

2016-02-10 Thread Steve Litt
On Thu, 11 Feb 2016 12:10:23 +1300 Daniel Reurich wrote: > > How 'legal' do you want this to be? My work contract has a clause > > which states that even if I dream of code/ something else which > > might be useful, the rights rest with my employer. > > That's insane and surely it's legally u

Re: [DNG] Wifi device names: was systemd is haunting me

2016-02-10 Thread Daniel Reurich
> How 'legal' do you want this to be? My work contract has a clause which > states that even if I dream of code/ something else which might be > useful, the rights rest with my employer. That's insane and surely it's legally unenforceable, and certainly if they don't pay you for the time spent d

Re: [DNG] Wifi device names: was systemd is haunting me

2016-02-10 Thread Rainer Weikusat
Steve Litt writes: > Rainer Weikusat wrote: [shell scripts] > 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. [...] > Is it OK with you to license it Expat? Is

Re: [DNG] Wifi device names: was systemd is haunting me

2016-02-10 Thread Steve Litt
On Mon, 01 Feb 2016 17:08:17 + Rainer Weikusat wrote: > Steve Litt writes: > > On Sun, 31 Jan 2016 18:20:12 -0500 > > Steve Litt wrote: > > [...] > > > === > > #!/bin/sh > > lineno=${1:-1} > > > > fn=`mktemp` > > > > ip -o link | \ > > cut -d '

Re: [DNG] Wifi device names: was systemd is haunting me

2016-02-01 Thread Rainer Weikusat
Steve Litt writes: > On Sun, 31 Jan 2016 18:20:12 -0500 > Steve Litt 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

Re: [DNG] Wifi device names: was systemd is haunting me

2016-01-31 Thread Steve Litt
On Sun, 31 Jan 2016 18:20:12 -0500 Steve Litt wrote: > Mine has an unintended bug that no matter how high the argument, > it prints the "last" one, where as yours prints nothing if the > argument is higher. I think my unintended bug might be considered > beneficial, although even better would be

Re: [DNG] Wifi device names: was systemd is haunting me

2016-01-31 Thread Steve Litt
On Sun, 31 Jan 2016 16:56:37 + Rainer Weikusat wrote: > Steve Litt writes: > > [...] > > > > > > #!/bin/sh > > if test "$#" == "0"; then > > lineno="1" > > else > > lineno=$1 > > fi > > > > ip link | \ > > cut -d ' ' -f2 | \ >

Re: [DNG] Wifi device names: was systemd is haunting me

2016-01-31 Thread Steve Litt
On Sun, 31 Jan 2016 15:30:01 +0100 Didier Kryn wrote: > Le 31/01/2016 03:12, Steve Litt a écrit : > > #!/bin/sh > > if test "$#" == "0"; then > >lineno="1" > > else > >lineno=$1 > > fi [snip] > Doesn't work out of the box. > > If /usr/bin/test was invoqued you should write '

Re: [DNG] Wifi device names: was systemd is haunting me

2016-01-31 Thread Rainer Weikusat
Steve Litt writes: [...] > > #!/bin/sh > if test "$#" == "0"; then > lineno="1" > else > lineno=$1 > fi > > ip link | \ > cut -d ' ' -f2 | \ > grep ^w | \ > sed -e "s/:\s*$//" | \ > head -n $lineno | \ > tail -n 1 > > ==

Re: [DNG] Wifi device names: was systemd is haunting me

2016-01-31 Thread Didier Kryn
Le 31/01/2016 03:12, Steve Litt a écrit : #!/bin/sh if test "$#" == "0"; then lineno="1" else lineno=$1 fi ip link | \ cut -d ' ' -f2 | \ grep ^w | \ sed -e "s/:\s*$//" | \ head -n $lineno | \ tail -n 1 Doesn't work out of the box. If /usr/bin/test was invoqued yo

[DNG] Wifi device names: was systemd is haunting me

2016-01-30 Thread Steve Litt
On Sat, 30 Jan 2016 19:26:48 -0500 Haines Brown wrote: > I have been running Debian Sid on a laptop with a purged systemd for > quite a few months. Maybe when I now ran # aptitude update or > safe-upgrade for the first time after several months since the Sid > installation systemd-udevd seems to