Is /etc/rc.local called twice on boot?
Oliver Grawert
ogra at ubuntu.com
Tue Oct 26 12:38:27 UTC 2021
hi,
Am Dienstag, dem 26.10.2021 um 13:29 +0100 schrieb Chris Green:
> On Tue, Oct 26, 2021 at 12:50:25PM +0200, Oliver Grawert wrote:
> > hi,
> > Am Dienstag, dem 26.10.2021 um 11:42 +0200 schrieb Bo Berglund:
> > > IPAddr=$(ifconfig eth0|grep "inet "|sed 's/ *inet //;s/ .*//')
> > > IPMac=$(ifconfig eth0 | grep -Eo ..\(\:..\){5})
> > >
> > independent from your particular double execution issue, you should
> > note that ifconfig (and ifupdown alongside) have long been
> > abandoned in
> > debian and ubuntu ...
> >
> > you should use "ip addr show dev eth0" on modern distros
> >
> Which is a pretty poor 'improvement' on ifconfig as you have to know
> the device name and it almost certainly *isn't* 'eth0' nowadays.
>
> It's much easier to remember just 'ifconfig' and it tells you what
> you
> want to know! :-)
i was only referrring to the code that bo posted where "ifconfig eth0"
is called ...
"ip addr" does indeed behave similar to ifconfig and lists all devices
by default without having to use a name ...
ciao
oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20211026/5bd4f4f6/attachment.sig>
More information about the ubuntu-users
mailing list