[DNG] Vdev [ was Re: if2mac init.d service for persistent network interface names]

2020-12-24 Thread Didier Kryn
Le 24/12/2020 à 10:23, aitor a écrit :
>
> Hi,
>
>> On 19/12/20 15:10, Didier Kryn wrote:
>>>     I think that, like in the case of Mdev, the biggest difficulty is in
>>> emulating libudev, which requires in particular to maintain an
>>> up-to-date database of devices. Jude has done a complete job and libvdev
>>> provides this emulation, but who maintains the database ?
>
> I've been working on vdev during these days, and i'm thinking on a
> possible new approach for it. For instance:
>
> 1) We should consider whether or not a separate ABI (libudev-compat)
> is required since the apparition
> of libeudev1 (libudev1 without systemd), or leave instead this other
> library (compatible  with libeudev1, or
> better said, depending on it) for new features added by Jude Nelson
> and contributors (say the whole libudev-fs.c
> or some add-ons like "udev_monitor *udev_monitor_new_from_filesystem"
> in libudev-monitor.c, non existent
> in libeudev1)
>
> 2) We should also consider the inclusion of a hardware database
> management  tool, call udevadm, vdevadm or
> whatever you want. I propose this addition due to the slow boot of the
> system caused by the lack of  this tool,
> i guess. In the case of eudev, the hardware database is compiled into
> a binary and only the binary is used at
> runtime. I should however add that yesterday I handled vdev with runit
> and the boot process was very quick,
> but there is a drawback here: you need to wait for the hardware to be
> detected. In a console session I needed
> to wait for the detection of wlan0 (even eth0 was detected
> inmediately); in a X session I couldn't login because
> neither the mouse nor the keyboard didn't respond.


    Aitor I think you are the only person who knows vdev in depth.
Therefore only you can decide what the best approach is, keeping in mind
the amount of work is implied by the maintenance. I also agree that a
tool to compile the database would be helpfull.

--     Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] double negative

2020-12-24 Thread Didier Kryn
    Just to remind, if you forgot it.

    There's one known case where double positive means negative: C++

    Not a provocation, just an easy joke (~:

--     Didier

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] savings from parallelism (Was: if2mac init.d service for persistent network interface names)

2020-12-24 Thread Didier Kryn
Le 24/12/2020 à 19:55, Simon Hobson a écrit :
> Didier Kryn  wrote:
>
>> Therefore I suspect the authors managed to launch several threads in order 
>> to save 0.01s of the boot time. Or to loose more because thread scheduling 
>> might well consume more than what parallelism saves.
> In the general case, parallelism only saves wall clock time IFF you have a 
> number of processes that have to wait on outside events while not 
> (significantly) using resources on the machine - or if they are exceedingly 
> computationally intensive that running tasks across multiple cores gives a 
> saving (not common during startup). So if you have things like bringing up 
> interfaces - waiting for WiFi to connect and DHCP to get an address, that 
> sort of thing. But even then there's probably little to be saved since you 
> usually have most of the system waiting for the network to be up before it 
> can proceed.
> But otherwise, especially with a spinning disk, parallelism will slow things 
> down because you force the disk to go off here there and everywhere getting 
> data for different processes. Not applicable during startup, but there are 
> memory considerations* too if the jobs are large. With SSD this is much less 
> of a problem.
>
>
> * As an aside, at a previous job many years ago, they got a network of Apollo 
> workstations in for running engineering software. The whole thing was 
> primarily driven by the naval architects for doing complex fluid dynamics and 
> structural modelling - and at the time Apollo had the higher spec number 
> cruncher. For context, this was when a 286 with a couple of megs of RAM was 
> considered high end - Apollo were using (from memory) Motorola 68000 range 
> processors and I think most of the workstations had 68020. They had to stop 
> people running their own jobs on the big machine simply because if asked to 
> run more than one then it would slow to a crawl when it started swapping. But 
> users were unable to grasp the concept of "wait your f'in turn" (some would 
> even cancel other running jobs to get theirs to run faster) - so restrictions 
> were imposed and only the admins could run jobs on it, everyone else had to 
> put their requests in a queue.
>
> Simon

    I remember these Apollos. They were shining and ran some brand of
Unix if I remember well. We had a few in my lab but I never got a chance
to touch one.

--         Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Didier Kryn
Le 24/12/2020 à 16:40, Hendrik Boom a écrit :
> I remember those days.  I has two different network cards, and things were 
> cnveniently consistent except when I did am upgrade to a new release.  Then, 
> and only them, might they switch places.
>
> Instead of reconfiguring everything, I just switched network cables.
>
> This no longer works today.  I've introduced new consistent names -- 
> something 
> line neth0 and neth1.
>
> And they seem no longer to be considered to be devices.  They are not present 
> in /dev.

    Network devices have never been in /dev. Only character devices and
block devices are.

--         Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Rick Moen
Quoting Ian Zimmerman (i...@very.loosely.org):

> But if "and" is a conjunction in this sentence pattern, the nouns or
> pronouns it joins together form the subject, and so they ought to be in
> the nominative, i.e. "John and I". 

Indeed.

I vaguely recall Hendrik suggesting that 'and' functioning as a
proposition makes 'John and me' a suitable subject for the sentence,
i.e., in the nominative case, which I thought a startling notion both
for the idea of 'and' being anything but a conjunction and for the
conclusion drawn.  I'd have to check the archive to see if I read that
entirely right -- but definitely the claim of 'and' being a preposition
was part of it.

Not that this is worth dwelling on, unless good for points of benevolent
entertainment.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Rick Moen
Quoting Hendrik Boom (hend...@topoi.pooq.com):

> I've been told that was the case in a long-gonne ancestor of modern
> English, possible Old English or the language of Beowulf.

It's not quite the same thing, but I am suddenly in a mind to provide a
link to a lovely piece by my acquaintance Poul Anderson, the
Danish-American science fiction author 'Uncleftish Beholding', in which
Poul briefly explains atomic theory in an alternate-universe English that
never received any Latin-derived vocabulary.

Here, my gift to thee and thee, for the Jul holiday (and let us remember
Poul and his wife Karen fondly):
https://msburkeenglish.files.wordpress.com/2010/04/uncleftish-beholding-aka-atomic-theory.pdf

(Watch out for that ymirstuff-235.  It can be troublesome.)

-- 
Cheers,My pid is Inigo Montoya.  You kill -9
Rick Moen  my parent process.  Prepare to vi.
r...@linuxmafia.com
McQ!  (4x80)
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Hendrik Boom
On Thu, Dec 24, 2020 at 08:30:32PM -0800, Ian Zimmerman wrote:
> On 2020-12-24 16:19, Rick Moen wrote:
> 
> > > Another such an example is
> > >John and me went swimming.
> > > Here 'and' serves as a preposition.
> > 
> > I'm not sure where the location is, where 'and' fails to be a
> > conjunction when used between two nouns in that fashion, but I'm
> > curious what colour the sky is, there.
> 
> But if "and" is a conjunction in this sentence pattern, the nouns or
> pronouns it joins together form the subject, and so they ought to be in
> the nominative, i.e. "John and I". I understood that to be Hendrik's
> point, even if he didn't express it very clearly (perhaps adding some
> irony to the thread).

Yes, that's true in modern educated English.

-- hendrik

> 
> -- 
> Ian
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Ian Zimmerman
On 2020-12-24 16:19, Rick Moen wrote:

> > Another such an example is
> >John and me went swimming.
> > Here 'and' serves as a preposition.
> 
> I'm not sure where the location is, where 'and' fails to be a
> conjunction when used between two nouns in that fashion, but I'm
> curious what colour the sky is, there.

But if "and" is a conjunction in this sentence pattern, the nouns or
pronouns it joins together form the subject, and so they ought to be in
the nominative, i.e. "John and I". I understood that to be Hendrik's
point, even if he didn't express it very clearly (perhaps adding some
irony to the thread).

-- 
Ian
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] savings from parallelism (Was: if2mac init.d service for persistent network interface names)

2020-12-24 Thread Steve Litt
On Thu, 24 Dec 2020 18:55:46 +
Simon Hobson  wrote:

> Didier Kryn  wrote:
> 
> > Therefore I suspect the authors managed to launch several threads
> > in order to save 0.01s of the boot time. Or to loose more because
> > thread scheduling might well consume more than what parallelism
> > saves.  
> 
> In the general case, parallelism only saves wall clock time IFF you
> have a number of processes that have to wait on outside events while
> not (significantly) using resources on the machine - or if they are
> exceedingly computationally intensive that running tasks across
> multiple cores gives a saving (not common during startup). So if you
> have things like bringing up interfaces - waiting for WiFi to connect
> and DHCP to get an address, that sort of thing. But even then there's
> probably little to be saved since you usually have most of the system
> waiting for the network to be up before it can proceed. But
> otherwise, especially with a spinning disk, parallelism will slow
> things down because you force the disk to go off here there and
> everywhere getting data for different processes. Not applicable
> during startup, but there are memory considerations* too if the jobs
> are large. With SSD this is much less of a problem.

The preceding is a great argument for using the Epoch init system.
Epoch has no facilities for parallel instantiation, so booting is
determinate. 

The reasons I use runit instead of Epoch are:

* Epoch has no respawn capability
* I don't think Epoch is maintained anymore.

My experiments with Epoch indicate its boot time was in the same
ballpark as runit and systemd.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Hendrik Boom
On Thu, Dec 24, 2020 at 04:19:43PM -0800, Rick Moen wrote:
> Quoting Hendrik Boom (hend...@topoi.pooq.com):
> 
> > Another such an example is
> >John and me went swimming.
> > Here 'and' serves as a preposition.
> 
> I'm not sure where the location is, where 'and' fails to be a conjunction
> when used between two nouns in that fashion, but I'm curious what colour
> the sky is, there.

I've been told that was the case in a long-gonne ancestor of modern English, 
possible Old English or the language of Beowulf.

-- hendrik

> 
> -- 
> Cheers,  "Like looking both ways before crossing the street, and 
> Rick Moenthen getting hit by a submarine."  -- Clarke Smith, age 
> 9, 
> r...@linuxmafia.com  winner of Washtington Post's contest for best description
> McQ! (4x80)  of the year 2020 in a single word or phrase.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Steve Litt
On Thu, 24 Dec 2020 16:32:18 +0100
tito via Dng  wrote:

> On Thu, 24 Dec 2020 10:10:07 -0500
> Steve Litt  wrote:
> 
> > On Wed, 23 Dec 2020 23:41:58 +0100
> > Didier Kryn  wrote:
> >   
> > > Le 23/12/2020 à 22:03, Antony Stone a écrit :  
> > > > If the kernel decides A=eth1, B=eth2, C=eth0 then there's no way
> > > > for udev rules to rename them, because "File exists" (which
> > > > should of course say "Device name exists").
> > > 
> > >     This should not happen and did not happen in the past because
> > > the interfaces are created sequentially.   
> > 
> > Yes it did. It happened in the 1900's. We were all advised never to
> > use the same type of network card for both interfaces, because which
> > card became eth0 would be indeterminate. I had eth0 magically switch
> > to eth1, and then back again, several times.
> > 
> > Earlier in this thread I submitted a shellscript that fixes this
> > whole problem, without all sorts of udev raindances.
> > 
> > SteveT
> > 
> > Steve Litt   
> 
> Hi,
> is it this one? How does it solve my problem to rename
> interfaces according to their mac address without 
> name collisions (plus corner cases)?
> 
> #!/bin/sh
> # Copyright (c) 2016 by Steve Litt
> # Expat license. See http://directory.fsf.org/wiki/License:Expat
> 
> chosen_wifi_number=${1:-1}
> wifidevs=0
> 
> for dev in `ip -o link | sed -n 's/[^:]*: *\(w[^:]*\).*/\1/p'`;
> do
> wifidevs=`expr $wifidevs + 1`
> 
> test $wifidevs -eq $chosen_wifi_number && {
>   echo $dev
>   exit 0
> }
> done
> 
> echo =max$wifidevs
> 
> Ciao,
> Tito


It either is the one, or looks a whole lot like it.

Note that somebody else on this list made it even better, but I can't
find that email again.

If the "w" in the sed command is changed to "e", then it does the same
thing for wired Ether net.

The shellscript I wrote spits out one answer. However, it could easily
be modified to do several, either letting you choose, or perhaps if
running exec'ed or dotted, create environment vars like eth0, eth1,
eth2, etc, and wlan0, wlan1, wlan2, etc, so all you need to do in your
shellscripts is change "wlan0" to "$wlan0". As long as nobody switches
slots or jacks, the numbering of these will be determinate. 

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Rick Moen
Quoting Hendrik Boom (hend...@topoi.pooq.com):

> Another such an example is
>John and me went swimming.
> Here 'and' serves as a preposition.

I'm not sure where the location is, where 'and' fails to be a conjunction
when used between two nouns in that fashion, but I'm curious what colour
the sky is, there.

-- 
Cheers,  "Like looking both ways before crossing the street, and 
Rick Moenthen getting hit by a submarine."  -- Clarke Smith, age 9, 
r...@linuxmafia.com  winner of Washtington Post's contest for best description
McQ! (4x80)  of the year 2020 in a single word or phrase.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread tito via Dng
On Thu, 24 Dec 2020 16:21:24 +0100
aitor  wrote:

> Hi Tito,
> 
> On 24/12/20 14:24, tito via Dng wrote:
> >   BTW: I noticed during my test that even pci bus numbers can
> >   change wildly in the predictable names case (vs MACS,
> >   if I recall it correctly).
> >   I thought that being tied to soldered sockets on the
> > motherboard they were immutable. Are they numbered on a first come
> >   first served basis? or where is my error?
> The following code is supposed to list the mac addresses together
> with the assigned names of
> all your network devices:
> 
> https://www.gnuinos.org/if2mac/ 
> 
> There is a lot of superfluous code on that, because i've just taken
> it from the backend of simple-netaid.
> Since it's has been tested only in the case of an unique wired device 
> and an unique wireless device (my case),
> please can you say if it works fine for you? If so, does the output
> in the command line matches your desired order?
> You need to install libiw-dev, and you can build it via:
> 
> $ gcc if2mac.c -o if2mac -liw
> 
> Thanks in advance,
> 
> Aitor.
> 
> 
> 
> 

Hi,
it works in detecting and listing the devices:

 ./if2mac 
MAC Address=00:xx:xx:xx:xx:47 -> eth5 - wired
MAC Address=00:xx:xx:xx:xx:46 -> eth4 - wired
MAC Address=00:xx:xx:xx:xx:4D -> eth11 - wired
MAC Address=54:xx:xx:xx:xx:62 -> wlan0 - wireless
MAC Address=00:xx:xx:xx:xx:6B -> eth3 - wired
MAC Address=00:xx:xx:xx:xx:4A -> eth8 - wired
MAC Address=00:xx:xx:xx:xx:4C -> eth10 - wired
MAC Address=00:xx:xx:xx:xx:4B -> eth9 - wired
MAC Address=00:xx:xx:xx:xx:49 -> eth7 - wired
MAC Address=00:xx:xx:xx:xx:6A -> eth2 - wired
MAC Address=00:xx:xx:xx:xx:69 -> eth1 - wired
MAC Address=00:xx:xx:xx:xx:68 -> eth0 - wired
MAC Address=00:xx:xx:xx:xx:48 -> eth6 - wired
MAC Address=00:xx:xx:xx:xx:6A -> br0 - wired

The order is somewhat. different.

Ciao,
Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] strange Tiger behaviour

2020-12-24 Thread Hendrik Boom
I use tiger as a reporter of potential problems.
Usually I get this message:

# Checking listening processes
NEW: --WARN-- [lin003w] The process `smtpd' is listening on socket 25 (TCP on 
every interface) is run by postfix.

Fair.  I do use postfix for my email.

I occasionally get another message about a port that Chrome or
Chromium opens to announce my printer to the entire world.
Tiger is being fair, but chrome/chromium is not.

But what puzzles me is that I also have a webserver running
that's accessible to the world, and its use of a port never
shows up on these reports.  Any ideas why not?

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Antony Stone
On Thursday 24 December 2020 at 15:49:22, Hendrik Boom wrote:

> On Thu, Dec 24, 2020 at 10:30:58AM +0100, aitor wrote:
> > On 24/12/20 10:23, aitor wrote:
> > > neither the mouse nor the keyboard didn't respond
> > 
> > Mmm..., this is a double denial. Neither the mouse nor the keyboard could
> > respond?
> 
> Agreed.  Happy to see neither..nor used.  Sometimes that's the clearest way
> to say something.
> 
> But I'd have said "neither the mouse nor the keyboard responded".

Agreed, however the "double negative" is between "neither" and "didn't", not 
"between "neither" and "nor".

That is a perfectly clear and reasonable complaint about the original comment.

Regards,


Antony.

-- 
People say that nothing is impossible, so I try to do the impossible every 
day.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] savings from parallelism (Was: if2mac init.d service for persistent network interface names)

2020-12-24 Thread Simon Hobson
Didier Kryn  wrote:

> Therefore I suspect the authors managed to launch several threads in order to 
> save 0.01s of the boot time. Or to loose more because thread scheduling might 
> well consume more than what parallelism saves.

In the general case, parallelism only saves wall clock time IFF you have a 
number of processes that have to wait on outside events while not 
(significantly) using resources on the machine - or if they are exceedingly 
computationally intensive that running tasks across multiple cores gives a 
saving (not common during startup). So if you have things like bringing up 
interfaces - waiting for WiFi to connect and DHCP to get an address, that sort 
of thing. But even then there's probably little to be saved since you usually 
have most of the system waiting for the network to be up before it can proceed.
But otherwise, especially with a spinning disk, parallelism will slow things 
down because you force the disk to go off here there and everywhere getting 
data for different processes. Not applicable during startup, but there are 
memory considerations* too if the jobs are large. With SSD this is much less of 
a problem.


* As an aside, at a previous job many years ago, they got a network of Apollo 
workstations in for running engineering software. The whole thing was primarily 
driven by the naval architects for doing complex fluid dynamics and structural 
modelling - and at the time Apollo had the higher spec number cruncher. For 
context, this was when a 286 with a couple of megs of RAM was considered high 
end - Apollo were using (from memory) Motorola 68000 range processors and I 
think most of the workstations had 68020. They had to stop people running their 
own jobs on the big machine simply because if asked to run more than one then 
it would slow to a crawl when it started swapping. But users were unable to 
grasp the concept of "wait your f'in turn" (some would even cancel other 
running jobs to get theirs to run faster) - so restrictions were imposed and 
only the admins could run jobs on it, everyone else had to put their requests 
in a queue.

Simon

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Ian Zimmerman
On 2020-12-24 10:40, Hendrik Boom wrote:

> And they seem no longer to be considered to be devices.  They are not
> present in /dev.

They never have been there (under Linux), to my best knowledge (and my
history is also long).

Maybe you are thinking of some other system?

-- 
Ian
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Rowland penny via Dng

On 24/12/2020 15:37, aitor wrote:

does the output in the command line matches your desired order?


Continuing with our English academy: does it match


'does the command line output match your desired order ?'

Also, do not get me started on the use of the word 'since' by non native 
English speakers. 😁


Rowland


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Hendrik Boom
On Thu, Dec 24, 2020 at 10:10:07AM -0500, Steve Litt wrote:
> On Wed, 23 Dec 2020 23:41:58 +0100
> Didier Kryn  wrote:
> 
> > Le 23/12/2020 à 22:03, Antony Stone a écrit :
> > > If the kernel decides A=eth1, B=eth2, C=eth0 then there's no way
> > > for udev rules to rename them, because "File exists" (which should
> > > of course say "Device name exists").  
> > 
> >     This should not happen and did not happen in the past because the
> > interfaces are created sequentially. 
> 
> Yes it did. It happened in the 1900's. We were all advised never to use
> the same type of network card for both interfaces, because which card
> became eth0 would be indeterminate. I had eth0 magically switch to
> eth1, and then back again, several times.

I remember those days.  I has two different network cards, and things were 
cnveniently consistent except when I did am upgrade to a new release.  Then, 
and only them, might they switch places.

Instead of reconfiguring everything, I just switched network cables.

This no longer works today.  I've introduced new consistent names -- something 
line neth0 and neth1.

And they seem no longer to be considered to be devices.  They are not present 
in /dev.

Do the deep innards of the kernel still consider them devices even though 
they are no longer present in /dev?  Is this an effect of the devtmpfs 
file system??

-- hendrik

> 
> Earlier in this thread I submitted a shellscript that fixes this whole
> problem, without all sorts of udev raindances.
> 
> SteveT
> 
> Steve Litt 
> Autumn 2020 featured book: Thriving in Tough Times
> http://www.troubleshooters.com/thrive
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

does the output in the command line matches your desired order?


Continuing with our English academy: does it match?


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread tito via Dng
On Thu, 24 Dec 2020 10:10:07 -0500
Steve Litt  wrote:

> On Wed, 23 Dec 2020 23:41:58 +0100
> Didier Kryn  wrote:
> 
> > Le 23/12/2020 à 22:03, Antony Stone a écrit :
> > > If the kernel decides A=eth1, B=eth2, C=eth0 then there's no way
> > > for udev rules to rename them, because "File exists" (which should
> > > of course say "Device name exists").  
> > 
> >     This should not happen and did not happen in the past because
> > the interfaces are created sequentially. 
> 
> Yes it did. It happened in the 1900's. We were all advised never to
> use the same type of network card for both interfaces, because which
> card became eth0 would be indeterminate. I had eth0 magically switch
> to eth1, and then back again, several times.
> 
> Earlier in this thread I submitted a shellscript that fixes this whole
> problem, without all sorts of udev raindances.
> 
> SteveT
> 
> Steve Litt 

Hi,
is it this one? How does it solve my problem to rename
interfaces according to their mac address without 
name collisions (plus corner cases)?

#!/bin/sh
# Copyright (c) 2016 by Steve Litt
# Expat license. See http://directory.fsf.org/wiki/License:Expat

chosen_wifi_number=${1:-1}
wifidevs=0

for dev in `ip -o link | sed -n 's/[^:]*: *\(w[^:]*\).*/\1/p'`;
do
wifidevs=`expr $wifidevs + 1`

test $wifidevs -eq $chosen_wifi_number && {
echo $dev
exit 0
}
done

echo =max$wifidevs

Ciao,
Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread Rowland penny via Dng

On 24/12/2020 14:49, Hendrik Boom wrote:

On Thu, Dec 24, 2020 at 10:30:58AM +0100, aitor wrote:

On 24/12/20 10:23, aitor wrote:

neither the mouse nor the keyboard didn't respond

Mmm..., this is a double denial. Neither the mouse nor the keyboard could
respond?

Agreed.  Happy to see neither..nor used.  Sometimes that's the clearest way to
say something.

But I'd have said "neither the mouse nor the keyboard responded".
I would have just said 'the mouse nor the keyboard responded' or 
'neither the mouse or the keyboard responded', no need for 'neither and 
'nor'.


This seems to be the prevailing English convention about double negation
nowadays -- that a double negation is a positive.

Historical note:

But there's an older convention (which I've heard dates back to Old English
and is common in other modern languages) where a double negation is used for
emphasis.

As in,

I ain't seen nothing!
Well it might be if "ain't" was a proper word, in fact, the whole 
sentence is gibberish, I personally would say 'I didn't see anything'.


This convention, which is perfectly understandable, was stamped out of
educated usage bu grammarians who slammed their understanding of Latin grammar
onto English which until than had a quite different grammer.

Another such an example is
John and me went swimming.
Here 'and' serves as a preposition.  Again, not Latin grammar.
And this has led fo confusion, when students misunderstand the new
Latin-inspired rules and start to treat 'and' as a preposition taking -- of
all things -- the nominative and end up with
He gave the ball to John and I.
The problem is that there are millions of People who speak English 
(which is not to be confused with what they speak in the USA), but there 
only a relative few that try to make the rules and they keep trying to 
change them.


Long live the complexities of evolving languages!


Which only makes sense if they evolve in a sensible way 😂

Rowland

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

it's has been


it has been... My wooden fingers :)

Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Historical note on double negation.

2020-12-24 Thread aitor

Hi Hendrik,

On 24/12/20 15:49, Hendrik Boom wrote:

Agreed.  Happy to see neither..nor used.  Sometimes that's the clearest way to
say something.

But I'd have said "neither the mouse nor the keyboard responded".

This seems to be the prevailing English convention about double negation
nowadays -- that a double negation is a positive.

Historical note:

But there's an older convention (which I've heard dates back to Old English
and is common in other modern languages) where a double negation is used for
emphasis.

As in,

I ain't seen nothing!

This convention, which is perfectly understandable, was stamped out of
educated usage bu grammarians who slammed their understanding of Latin grammar
onto English which until than had a quite different grammer.

Another such an example is
John and me went swimming.
Here 'and' serves as a preposition.  Again, not Latin grammar.
And this has led fo confusion, when students misunderstand the new
Latin-inspired rules and start to treat 'and' as a preposition taking -- of
all things -- the nominative and end up with
He gave the ball to John and I.

Long live the complexities of evolving languages!


Thanks for your clarification :)

Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

Hi Tito,

On 24/12/20 14:24, tito via Dng wrote:

  BTW: I noticed during my test that even pci bus numbers can
  change wildly in the predictable names case (vs MACS,
  if I recall it correctly).
  I thought that being tied to soldered sockets on the motherboard
  they were immutable. Are they numbered on a first come
  first served basis? or where is my error?
The following code is supposed to list the mac addresses together with 
the assigned names of

all your network devices:

https://www.gnuinos.org/if2mac/ 

There is a lot of superfluous code on that, because i've just taken it 
from the backend of simple-netaid.
Since it's has been tested only in the case of an unique wired device 
and an unique wireless device (my case),
please can you say if it works fine for you? If so, does the output in 
the command line matches your desired order?

You need to install libiw-dev, and you can build it via:

$ gcc if2mac.c -o if2mac -liw

Thanks in advance,

Aitor.




___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Steve Litt
On Wed, 23 Dec 2020 23:41:58 +0100
Didier Kryn  wrote:

> Le 23/12/2020 à 22:03, Antony Stone a écrit :
> > If the kernel decides A=eth1, B=eth2, C=eth0 then there's no way
> > for udev rules to rename them, because "File exists" (which should
> > of course say "Device name exists").  
> 
>     This should not happen and did not happen in the past because the
> interfaces are created sequentially. 

Yes it did. It happened in the 1900's. We were all advised never to use
the same type of network card for both interfaces, because which card
became eth0 would be indeterminate. I had eth0 magically switch to
eth1, and then back again, several times.

Earlier in this thread I submitted a shellscript that fixes this whole
problem, without all sorts of udev raindances.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread tito via Dng
On Thu, 24 Dec 2020 08:47:17 -0500
Curtis Maurand via Dng  wrote:

> because system bios is running a version of embedded linux and it
> dynamically populates things at boot up.   the only immutable bit is
> the interface’s mac.

Thanks,
suspected something like this.

Ciao,
Tito

> Sent from my iPhone
> 
> > On Dec 24, 2020, at 8:24 AM, tito via Dng 
> > wrote:
> > 
> > On Thu, 24 Dec 2020 00:40:58 +0100
> > Didier Kryn  wrote:
> > 
> >> Le 24/12/2020 à 00:24, Antony Stone a écrit :
> Or maybe the kernel is much faster than Eudev and it has the
>  time to create the interfaces faster than Eudev processes them.
> >>> That sounds likely.
> >>> 
> But for sure the mechanism worked in the past.
> >>> I completely agree.
> >>> 
> >>> As I said in my opening posting on the "Ethernet names revisited"
> >>> thread:
> >>> 
> >>> | I'm trying to work out how to give those interfaces the names I
> >>> want; the | motherboard as eth0, and the PCI card as eth1 / eth2.
> >>> |
> >>> | Historically, I've been used to udev
> >>> and /etc/udev/rules.d/70-persistent- | net.rules doing this, where
> >>> I can specify the name I want for each interface | according to
> >>> its MAC address.
> >>> 
> >>> By "historically" I meant "up to Jessie, and I think also
> >>> Stretch / Ascii". It's not doing the same in Buster / Beowulf.
> >> 
> >> Maybe the kernel used to give a chance to udev to rename the
> >> interfaces and, for some reason, it stopped doing it. And the
> >> reason might be there's no point given the new fashion of naming
> >> the interfaces with complicated names.
> >> 
> >> It remains possible to do what you want by the mean of a
> >> temporary name and permutations, or by the method of Tito which
> >> uses several temporary names, but is generic. But I agree it is
> >> irritating to not be able to use Udev since it's sitting there
> >> anyway.
> >> 
> >> 
> > Hi,
> > still I'm not satisfied by my approach as there are a few
> > shortcomings that I can think of:
> > 
> > 1) if2mac does rename in the first pass only the interfaces in
> > if2mac.conf  so if there are other interfaces or if they are
> > added later name collisions are still possible in the second pass.
> > A workaround could be to rename all existing interfaces but this
> > could leave some interfaces not included in the config file
> > half-renamed in the end or you need to rename them back to
> > the original name in a third pass (if the name is still
> > available, otherwise you need to find a arbitrary new one).  
> > Still don't know how to handle this in a simple and clean way.
> > 2)  I suspect that if you rmmod and insmod the nic's or wlan's
> > module the old names will be assigned by udev/eudev so some
> > kind of interaction with udev is still needed.
> > 3)  it would be optimal to make it accept a config dir that can hold
> > multiple config files so that you can name some nics WAN*
> > some others LAN* and others OPT*  but this would add even more
> > complexity.
> > 
> > in the end it would be best to fix udev/eudev and let it handle it
> > like it did before.
> > A workaround could be to use names that differ totally from the
> > old and the "*** predictable names" like (LAN1, OPT1, WIFI1)
> > but changing of all configs is needed and this was what I wanted
> > to avoid when I started this attempt.
> > As we have 4 days of lockdown there is plenty time to think about
> > it
> > 
> > Ciao,
> > Tito
> > 
> > BTW: I noticed during my test that even pci bus numbers can 
> > change wildly in the predictable names case (vs MACS,
> > if I recall it correctly).
> > I thought that being tied to soldered sockets on the
> > motherboard they were immutable. Are they numbered on a first come
> > first served basis? or where is my error?   
> > 
> > 
> > ___
> > Dng mailing list
> > Dng@lists.dyne.org
> > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Historical note on double negation.

2020-12-24 Thread Hendrik Boom
On Thu, Dec 24, 2020 at 10:30:58AM +0100, aitor wrote:
> On 24/12/20 10:23, aitor wrote:
> > neither the mouse nor the keyboard didn't respond
> Mmm..., this is a double denial. Neither the mouse nor the keyboard could
> respond?

Agreed.  Happy to see neither..nor used.  Sometimes that's the clearest way to 
say something.

But I'd have said "neither the mouse nor the keyboard responded".

This seems to be the prevailing English convention about double negation 
nowadays -- that a double negation is a positive.

Historical note:

But there's an older convention (which I've heard dates back to Old English 
and is common in other modern languages) where a double negation is used for 
emphasis.

As in,

   I ain't seen nothing!

This convention, which is perfectly understandable, was stamped out of 
educated usage bu grammarians who slammed their understanding of Latin grammar 
onto English which until than had a quite different grammer.

Another such an example is
   John and me went swimming.
Here 'and' serves as a preposition.  Again, not Latin grammar.
And this has led fo confusion, when students misunderstand the new 
Latin-inspired rules and start to treat 'and' as a preposition taking -- of 
all things -- the nominative and end up with
   He gave the ball to John and I.

Long live the complexities of evolving languages!

-- hendrik
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread Curtis Maurand via Dng
because system bios is running a version of embedded linux and it dynamically 
populates things at boot up.   the only immutable bit is the interface’s mac.

Sent from my iPhone

> On Dec 24, 2020, at 8:24 AM, tito via Dng  wrote:
> 
> On Thu, 24 Dec 2020 00:40:58 +0100
> Didier Kryn  wrote:
> 
>> Le 24/12/2020 à 00:24, Antony Stone a écrit :
Or maybe the kernel is much faster than Eudev and it has the
 time to create the interfaces faster than Eudev processes them.
>>> That sounds likely.
>>> 
But for sure the mechanism worked in the past.
>>> I completely agree.
>>> 
>>> As I said in my opening posting on the "Ethernet names revisited"
>>> thread:
>>> 
>>> | I'm trying to work out how to give those interfaces the names I
>>> want; the | motherboard as eth0, and the PCI card as eth1 / eth2.
>>> |
>>> | Historically, I've been used to udev
>>> and /etc/udev/rules.d/70-persistent- | net.rules doing this, where
>>> I can specify the name I want for each interface | according to its
>>> MAC address.
>>> 
>>> By "historically" I meant "up to Jessie, and I think also Stretch /
>>> Ascii". It's not doing the same in Buster / Beowulf.
>> 
>> Maybe the kernel used to give a chance to udev to rename the
>> interfaces and, for some reason, it stopped doing it. And the reason
>> might be there's no point given the new fashion of naming the
>> interfaces with complicated names.
>> 
>> It remains possible to do what you want by the mean of a temporary
>> name and permutations, or by the method of Tito which uses several
>> temporary names, but is generic. But I agree it is irritating to not
>> be able to use Udev since it's sitting there anyway.
>> 
>> 
> Hi,
> still I'm not satisfied by my approach as there are a few shortcomings
> that I can think of:
> 
> 1) if2mac does rename in the first pass only the interfaces in
> if2mac.conf  so if there are other interfaces or if they are  added
> later name collisions are still possible in the second pass.
> A workaround could be to rename all existing interfaces but this
> could leave some interfaces not included in the config file
> half-renamed in the end or you need to rename them back to
> the original name in a third pass (if the name is still available,
> otherwise you need to find a arbitrary new one).  
> Still don't know how to handle this in a simple and clean way.
> 2)  I suspect that if you rmmod and insmod the nic's or wlan's
> module the old names will be assigned by udev/eudev so some
> kind of interaction with udev is still needed.
> 3)  it would be optimal to make it accept a config dir that can hold
> multiple config files so that you can name some nics WAN*
> some others LAN* and others OPT*  but this would add even more
> complexity.
> 
> in the end it would be best to fix udev/eudev and let it handle it
> like it did before.
> A workaround could be to use names that differ totally from the
> old and the "*** predictable names" like (LAN1, OPT1, WIFI1)
> but changing of all configs is needed and this was what I wanted
> to avoid when I started this attempt.
> As we have 4 days of lockdown there is plenty time to think about it
> 
> Ciao,
> Tito
> 
> BTW: I noticed during my test that even pci bus numbers can 
> change wildly in the predictable names case (vs MACS,
> if I recall it correctly).
> I thought that being tied to soldered sockets on the motherboard 
> they were immutable. Are they numbered on a first come
> first served basis? or where is my error?   
> 
> 
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread tito via Dng
On Thu, 24 Dec 2020 00:40:58 +0100
Didier Kryn  wrote:

> Le 24/12/2020 à 00:24, Antony Stone a écrit :
> >> Or maybe the kernel is much faster than Eudev and it has the
> >> time to create the interfaces faster than Eudev processes them.
> > That sounds likely.
> >
> >> But for sure the mechanism worked in the past.
> > I completely agree.
> >
> > As I said in my opening posting on the "Ethernet names revisited"
> > thread:
> >
> > | I'm trying to work out how to give those interfaces the names I
> > want; the | motherboard as eth0, and the PCI card as eth1 / eth2.
> > |
> > | Historically, I've been used to udev
> > and /etc/udev/rules.d/70-persistent- | net.rules doing this, where
> > I can specify the name I want for each interface | according to its
> > MAC address.
> >
> > By "historically" I meant "up to Jessie, and I think also Stretch /
> > Ascii". It's not doing the same in Buster / Beowulf.
> 
>     Maybe the kernel used to give a chance to udev to rename the
> interfaces and, for some reason, it stopped doing it. And the reason
> might be there's no point given the new fashion of naming the
> interfaces with complicated names.
> 
>     It remains possible to do what you want by the mean of a temporary
> name and permutations, or by the method of Tito which uses several
> temporary names, but is generic. But I agree it is irritating to not
> be able to use Udev since it's sitting there anyway.
> 
> 
Hi,
still I'm not satisfied by my approach as there are a few shortcomings
that I can think of:

1) if2mac does rename in the first pass only the interfaces in
 if2mac.conf  so if there are other interfaces or if they are  added
 later name collisions are still possible in the second pass.
 A workaround could be to rename all existing interfaces but this
 could leave some interfaces not included in the config file
 half-renamed in the end or you need to rename them back to
 the original name in a third pass (if the name is still available,
 otherwise you need to find a arbitrary new one).  
 Still don't know how to handle this in a simple and clean way.
2)  I suspect that if you rmmod and insmod the nic's or wlan's
 module the old names will be assigned by udev/eudev so some
 kind of interaction with udev is still needed.
3)  it would be optimal to make it accept a config dir that can hold
 multiple config files so that you can name some nics WAN*
 some others LAN* and others OPT*  but this would add even more
 complexity.

in the end it would be best to fix udev/eudev and let it handle it
like it did before.
A workaround could be to use names that differ totally from the
old and the "*** predictable names" like (LAN1, OPT1, WIFI1)
but changing of all configs is needed and this was what I wanted
to avoid when I started this attempt.
As we have 4 days of lockdown there is plenty time to think about it

Ciao,
Tito

 BTW: I noticed during my test that even pci bus numbers can 
 change wildly in the predictable names case (vs MACS,
 if I recall it correctly).
 I thought that being tied to soldered sockets on the motherboard 
 they were immutable. Are they numbered on a first come
 first served basis? or where is my error?   
   
 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

Hi tito,

On 22/12/20 8:18, tito via Dng wrote:

BTW I don't know how to achieve this with udev rules
could you be so kind and make a minimal example.


You can invoke your bourne shell script from a new udev.rule via:

IMPORT{program}="script"

If you locate this script in /lib/udev, the path to the script is 
superfluous.
On the other hand, you can define new udev.rule stanzas from the shell 
script
at boot time as follows (in this concrete case, we are using 
70-persistent-net.rules

and previously we source the rule_generator.funcions):


#!/bin/sh -e

RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'

# Source the rule_generator.funcions:
. /lib/udev/rule_generator.functions

# lock 70-persistent-net.rules, preventing concurrent processes from 
modifying the file at the same time.

lock_rules_file

# Check if the rules file is writeable.
choose_rules_file

# Write the stanza
echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", 
ATTR{address}==\"$mac_address\", ATTR{type}==\"1\", KERNEL==\"?*\", 
NAME=\"$name\""

>> $RULES_FILE

# Unlock 70-persistent-net.rules
unlock_rules_file

exit 0


For more instruction, have a look at "/lib/udev/write_net_rules" script.

Hope this helps,

Aitor.



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

On 24/12/20 10:23, aitor wrote:

neither the mouse nor the keyboard didn't respond
Mmm..., this is a double denial. Neither the mouse nor the keyboard 
could respond?
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

On 24/12/20 10:23, aitor wrote:

neither the mouse nor the keyboard didn't respond
Mmm..., this is a double denial. Neither the mouse nor the keyboard 
could respond?
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] if2mac init.d service for persistent network interface names

2020-12-24 Thread aitor

Hi,


On 19/12/20 15:10, Didier Kryn wrote:

     I think that, like in the case of Mdev, the biggest difficulty is in
emulating libudev, which requires in particular to maintain an
up-to-date database of devices. Jude has done a complete job and libvdev
provides this emulation, but who maintains the database ?


I've been working on vdev during these days, and i'm thinking on a 
possible new approach for it. For instance:


1) We should consider whether or not a separate ABI (libudev-compat) is 
required since the apparition
of libeudev1 (libudev1 without systemd), or leave instead this other 
library (compatible  with libeudev1, or
better said, depending on it) for new features added by Jude Nelson and 
contributors (say the whole libudev-fs.c
or some add-ons like "udev_monitor *udev_monitor_new_from_filesystem" in 
libudev-monitor.c, non existent

in libeudev1)

2) We should also consider the inclusion of a hardware database 
management  tool, call udevadm, vdevadm or
whatever you want. I propose this addition due to the slow boot of the 
system caused by the lack of  this tool,
i guess. In the case of eudev, the hardware database is compiled into a 
binary and only the binary is used at
runtime. I should however add that yesterday I handled vdev with runit 
and the boot process was very quick,
but there is a drawback here: you need to wait for the hardware to be 
detected. In a console session I needed
to wait for the detection of wlan0 (even eth0 was detected inmediately); 
in a X session I couldn't login because

neither the mouse nor the keyboard didn't respond.

Cheers,

Aitor.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng