Is /etc/rc.local called twice on boot?

Chris Green cl at isbd.net
Tue Oct 26 12:29:04 UTC 2021


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! :-)

-- 
Chris Green




More information about the ubuntu-users mailing list