<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Sat, Feb 22, 2020 at 9:29 AM Bill Meek <<a href="mailto:keemllib@gmail.com">keemllib@gmail.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/22/20 9:00 AM, David Hampton wrote:<br>
> On February 22, 2020 2:43:35 PM UTC, James Abernathy <<a href="mailto:jfabernathy@gmail.com" target="_blank">jfabernathy@gmail.com</a>> wrote:<br>
>> On my development system I ran an update today to<br>
>> version 2:31.0+fixes.202002201553.9ab3c45~ubuntu18.04.1 and noticed an<br>
>> error flash by about ifconfig not found. Can't tell you more than that<br>
>> except to say this system is a fresh install of Ubuntu 18.04.4 LTS with<br>
>> Mythtv v31 from the PPA. So ifconfig is not installed by default.<br>
>> Ubuntu<br>
>> 18.04 uses "ip address" to return the IP address. ifconfig can still be<br>
>> installed with net-tools, but it's optional<br>
> <br>
> Given that the 'ip' command was introduced a decade ago, I think its time we updated MythTV to use that instead of 'ifconfig'. ;-)<br>
> <br>
> Feel free to open a bug and assign it to me, but it will be a couple of weeks before I can work on it.<br>
> <br>
<br>
David,<br>
<br>
I'll push a fix. James, thanks for spotting the error.<br>
<br>
After replacing ifconfig with ip address, I saw that $NEWIP is set but no longer used.<br>
MasterServerIP and BackendServerIP UPDATEs were removed by Thomas in 2014, but this<br>
code was left.<br>
<br>
deb/debian/mythtv-database.postinst:<br>
-            NEWIP=`ifconfig | grep "inet addr:" | grep --invert-match 127.0.0.1 | sed ' s/inet addr://g; s/^[ \t]*//;s/[ \t]*$//; q;' | awk <br>
'{print $1}'`<br>
+            NEWIP=`ip address | grep "inet " | egrep --invert-match "127\.0\.0|169\.254"| sed ' s/inet addr://g; s/^[ \t]*//;s/[ \t]*$//; q;' | <br>
awk '{print $2}'`<br>
<br>
<br>
-- <br>
Bill<br></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace,monospace">Using `hostname -[i|I]` has been in linux for quite sometime too.  Much easier than screen scraping the ip|ifconfig commands.</div></div></div>