[mythtv-users] error during v31 update

Greg Oliver oliver.greg at gmail.com
Sun Feb 23 12:26:12 UTC 2020


On Sat, Feb 22, 2020 at 9:29 AM Bill Meek <keemllib at gmail.com> wrote:

> 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.
> >
>
> David,
>
> 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.
>
> deb/debian/mythtv-database.postinst:
> -            NEWIP=`ifconfig | grep "inet addr:" | grep --invert-match
> 127.0.0.1 | 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}'`
>
>
> --
> Bill
>

Using `hostname -[i|I]` has been in linux for quite sometime too.  Much
easier than screen scraping the ip|ifconfig commands.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200223/e3478bb4/attachment.htm>


More information about the mythtv-users mailing list