From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Brewer To: development@lists.ipfire.org Subject: Re: Porting ipcop addons Date: Fri, 12 Jan 2018 18:53:53 +0000 Message-ID: In-Reply-To: <1515760498.3647.52.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3428166793057199441==" List-Id: --===============3428166793057199441== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, Thank you for your reply it is very helpful. Michael Tremer wrote: > Hey Bob, >=20 > thanks for getting in touch. >=20 > I had no idea that too many people are still active around the IPCop > community, but welcome to IPFire. >=20 I am still running an IPcop firewall but have been looking at IPFire for=20 sometime as a replacement to the unsupported IPCop. I released adslmonitor a = number of years ago which I had developed it for my own use to analyze my=20 rather flaky adsl connection and hoped it would be of use to others with the = same problem. I have made a number of changes over the years to support vdsl = routers using ssh or telnet access but haven't released any updates as yet. I was thinking that I would release an updated version for IPFire if I=20 could get it running on my own test box first but I see that your addons=20 follow a different path to IPCop addons so was trying to understand what is=20 involved. =20 > I guess this would be a great addition to IPFire although I could not find > out which modems are supported. Is there any (bigger?) ISP handing out any > compatible ones? >=20 In my original version I parsed the adsl data from the router's web pages=20 with a regex. The problem here is that each different manufacturer need a=20 different regex. Hopefully accessing the modem/router with ssh or telnet=20 should make data collection less complex. > I had a look at the code that you linked and that looks quite good. It's > clean and tidy and I think porting that over would not be too hard. > However, we don't run the perl scripts any more to collect stats. We use > collectd in IPFire 2. >=20 I've made a start and have the first web page (router.cgi) running on my=20 IPFire test system. There weren't many problems mainly changing file=20 locations from IPCop defaults to the IPFire ones. > Since we should not run the cron job to collect data for every since even > when it doesn't have a compatible device, we should make this an add-on. > I agree. =20 > What you will need to do is check out the build system as described here: >=20 > https://wiki.ipfire.org/devel/ipfire-2.x/build-howto >=20 > Then you would have to create a file called lfs/adslmonitor or something > similar and roughly follow these steps: >=20 > https://wiki.ipfire.org/devel/ipfire-2.x/addon-howto >=20 Thanks for the links. > I guess a good example to follow would be guardian which is also an add-on > written in perl: >=20 > =20 https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dblob;f=3Dlfs/guardian;h=3Df300= 1c82128f3ba08290eea295b87cf342f65590;hb=3DHEAD >=20 OK =20 > To add a button to the navigation, you will have to add a file with some > information to /var/ipfire/menu.d. They are here in the source: >=20 > =20 https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dtree;f=3Dconfig/menu;h=3D64cd8= c17713574e84a7012803f3261b8a8e81801;hb=3DHEAD >=20 > Just dropping a file into that directory will do it. >=20 OK I'll try to make the changes this way but on my test system I just hacked = the /var/ipfire/menu.d/20-status.menu and added an extra item. Different to=20 what I was used to in IPCop which uses a 'MENUENTRY' item in the perl script = header.=20 > I hope that this gives you some good guidance. If you have any further > questions please ask at any time. >=20 > Best, > -Michael >=20 Thanks again for your really useful reply, I am also running a few other=20 prototype addons on my IPCop which could be ported over. One of these sends=20 the daily firewall logs to dshield and another is a hack of the old IPCop=20 Banish addon which is under development. Let me know if you think these could be useful to IPFire Kind Regards Bob --===============3428166793057199441==--