--- mediaserv.orig 2007-12-17 22:32:31.000000000 -0500 +++ mediaserv 2007-12-17 22:36:47.000000000 -0500 @@ -82,8 +82,8 @@ # unless ($ip) { local $ENV{PATH} = '/usr/local/sbin:/usr/sbin:/sbin:'.$ENV{PATH}; - $ip = `ifconfig \$(netstat -arn | awk '\$1 ~ /0\.0\.0\.0/ {print \$8; exit}')`; - $ip =~ s/^.*?:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) .*$/$1/s if $ip; + $ip = `ifconfig \$(netstat -arn | awk '\$1 ~ /default/ {print \$6; exit}')`; + $ip =~ s/^.*inet (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) .*$/$1/s if $ip; } # -- See if we can use Gnome to get thumbnails for videos...