Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: patch for dvb_net.c (x Marcus)



> Could you think on the long run about a way to run this program as a 
> deamon?
> 
> This would mean that it reads it config from a file from e.g. 
> /etc/dvb_net.conf, forks itself in the background and behaves like all 
> the other deamons in a unix environment?

This can be a startup /etc/rc* scrpit daemon. there's attached
perl script. Just add a line similar to:
&dvbnet($ADAPTER, 0, 2000, "192.168.21.1", "21:22:23:24:25:26");
in net_start.pl and viola.

It can be also a webmin module. I'm not webmin expert but 
some small modifying something similer like e.g.

/usr/share/webmin/net/list_ifcs.cgi

(it's a small 80 lines long perl script).

Can be adapted to use netdev as a backend for 
adding/removing dvb network interfaces from a web 
server.

> I'll apply your update to CVS.

Here's additional perl script fix which removes trailing 
space from "dvbX_Y " to "dvbX_Y" more suitable when one 
wants to echo 0 > /proc/sys/net/dvbX_Y/etcetc...

Emard
Only in dvbnet-1.1.1: LICENSE
diff -pur dvbnet-1.1.0/net_start.pl dvbnet-1.1.1/net_start.pl
--- dvbnet-1.1.0/net_start.pl	Mon Feb 10 23:00:05 2003
+++ dvbnet-1.1.1/net_start.pl	Tue Feb 11 16:24:37 2003
@@ -12,11 +12,11 @@ sub dvbnet
 {
   local ($ADAPTER, $NETDEV, $PID, $IP_ADDR, $MAC_ADDR) = @_;
 
-  $DEV_NAME = `./dvbnet -a $ADAPTER -n $NETDEV -p $PID | grep created`;
+  $DEV_NAME = `dvbnet -a $ADAPTER -n $NETDEV -p $PID | grep created`;
   chop($DEV_NAME);
 
   $DEV_NAME =~ s/(.*)device //;
-  $DEV_NAME =~ s/for (.*)//;
+  $DEV_NAME =~ s/ for (.*)//;
 
   $X = `/sbin/ifconfig $DEV_NAME $IP_ADDR netmask 255.255.255.0`;
   $X = `/sbin/ifconfig $DEV_NAME hw ether $MAC_ADDR promisc`;
diff -pur dvbnet-1.1.0/version.h.in dvbnet-1.1.1/version.h.in
--- dvbnet-1.1.0/version.h.in	Mon Feb 10 21:16:00 2003
+++ dvbnet-1.1.1/version.h.in	Tue Feb 11 16:18:14 2003
@@ -1 +1 @@
-1.1.0-TVF
+1.1.1-TVF

Home | Main Index | Thread Index