[mythtv-users] error during v31 update

Bill Meek keemllib at gmail.com
Sat Feb 22 15:27:44 UTC 2020

On 2/22/20 9:00 AM, David Hampton wrote:
> On February 22, 2020 2:43:35 PM UTC, James Abernathy <jfabernathy at gmail.com> wrote:
>> On my development system I ran an update today to
>> version 2:31.0+fixes.202002201553.9ab3c45~ubuntu18.04.1 and noticed an
>> error flash by about ifconfig not found. Can't tell you more than that
>> except to say this system is a fresh install of Ubuntu 18.04.4 LTS with
>> Mythtv v31 from the PPA. So ifconfig is not installed by default.
>> Ubuntu
>> 18.04 uses "ip address" to return the IP address. ifconfig can still be
>> installed with net-tools, but it's optional
> Given that the 'ip' command was introduced a decade ago, I think its time we updated MythTV to use that instead of 'ifconfig'. ;-)
> 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.


I'll push a fix. James, thanks for spotting the error.

After replacing ifconfig with ip address, I saw that $NEWIP is set but no longer used.
MasterServerIP and BackendServerIP UPDATEs were removed by Thomas in 2014, but this
code was left.

-            NEWIP=`ifconfig | grep "inet addr:" | grep --invert-match | sed ' s/inet addr://g; s/^[ \t]*//;s/[ \t]*$//; q;' | awk 
'{print $1}'`
+            NEWIP=`ip address | grep "inet " | egrep --invert-match "127\.0\.0|169\.254"| sed ' s/inet addr://g; s/^[ \t]*//;s/[ \t]*$//; q;' | 
awk '{print $2}'`


More information about the mythtv-users mailing list