diff options
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch')
-rw-r--r-- | meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch new file mode 100644 index 000000000..46f310979 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | diff -Nru webmin-1.570.bak/mediatomb/index.cgi webmin-1.570/mediatomb/index.cgi | ||
2 | --- webmin-1.570.bak/mediatomb/index.cgi 1969-12-31 16:00:00.000000000 -0800 | ||
3 | +++ webmin-1.570/mediatomb/index.cgi 2011-10-26 10:00:05.992522036 -0700 | ||
4 | @@ -0,0 +1,13 @@ | ||
5 | +#!/usr/bin/perl | ||
6 | +# index.cgi | ||
7 | +# Display MediaTomb option categories | ||
8 | + | ||
9 | +require './mediatomb-lib.pl'; | ||
10 | + | ||
11 | +ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); | ||
12 | + | ||
13 | + | ||
14 | +$ipaddress = &get_my_address(); | ||
15 | +print &text('index_desc', $ipaddress),"<p>\n"; | ||
16 | + | ||
17 | +ui_print_footer("/", $text{'index'}); | ||
18 | diff -Nru webmin-1.570.bak/mediatomb/lang/en webmin-1.570/mediatomb/lang/en | ||
19 | --- webmin-1.570.bak/mediatomb/lang/en 1969-12-31 16:00:00.000000000 -0800 | ||
20 | +++ webmin-1.570/mediatomb/lang/en 2011-10-26 10:01:13.340522186 -0700 | ||
21 | @@ -0,0 +1,2 @@ | ||
22 | +index_title=MediaTomb | ||
23 | +index_desc=MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface. You can access it via <a href='http://$1:49153'>here</a>. | ||
24 | diff -Nru webmin-1.570.bak/mediatomb/mediatomb-lib.pl webmin-1.570/mediatomb/mediatomb-lib.pl | ||
25 | --- webmin-1.570.bak/mediatomb/mediatomb-lib.pl 1969-12-31 16:00:00.000000000 -0800 | ||
26 | +++ webmin-1.570/mediatomb/mediatomb-lib.pl 2011-10-26 10:01:34.692522079 -0700 | ||
27 | @@ -0,0 +1,31 @@ | ||
28 | +#!/usr/bin/perl | ||
29 | +# mediatomb-lib.pl | ||
30 | +# Common functions for the MediaTomb module | ||
31 | + | ||
32 | +BEGIN { push(@INC, ".."); }; | ||
33 | +use WebminCore; | ||
34 | +&init_config(); | ||
35 | + | ||
36 | +sub get_my_address | ||
37 | +{ | ||
38 | +my $myip; | ||
39 | +if (&foreign_check("net")) { | ||
40 | + # Try to get ethernet interface | ||
41 | + &foreign_require("net", "net-lib.pl"); | ||
42 | + my @act = &net::active_interfaces(); | ||
43 | + my @ifaces = grep { &net::iface_type($_->{'fullname'}) =~ /ether/i } | ||
44 | + @act; | ||
45 | + @ifaces = ( $act[0] ) if (!@ifaces && @act); | ||
46 | + if (@ifaces) { | ||
47 | + return wantarray ? ( map { $_->{'address'} } @ifaces ) | ||
48 | + : $ifaces[0]->{'address'}; | ||
49 | + } | ||
50 | + } | ||
51 | +$myip = &to_ipaddress(&get_system_hostname()); | ||
52 | +if ($myip) { | ||
53 | + # Can resolve hostname .. use that | ||
54 | + return wantarray ? ( $myip ) : $myip; | ||
55 | + } | ||
56 | +return wantarray ? ( ) : undef; | ||
57 | +} | ||
58 | + | ||
59 | diff -Nru webmin-1.570.bak/mediatomb/module.info webmin-1.570/mediatomb/module.info | ||
60 | --- webmin-1.570.bak/mediatomb/module.info 1969-12-31 16:00:00.000000000 -0800 | ||
61 | +++ webmin-1.570/mediatomb/module.info 2011-10-26 09:59:50.428528369 -0700 | ||
62 | @@ -0,0 +1,3 @@ | ||
63 | +desc=MediaTomb | ||
64 | +category=others | ||
65 | +longdesc=MediaTomb access module | ||