Post by vision on Jun 21, 2006 14:25:08 GMT 7
Hi,
Just thought I'd share my experiences with playing with the module files for the N2100. I should warn everyone before they start playing - I managed to get a permanent module which won't uninstall by not TARing the files properly before uploading to my YES box.
Rather than retype everything, I'm going to cut and paste what I sent to ktula:
How did you go with the module files I sent you? I decided to do a bit of poking around with them and opened them with winrar - it turns out they are just zipped tar files. For each module there are several system directories, along with a redundant (?) TGZ of the directories and a MOD file which is just the same TGZ file renamed.
For the PPP-Blog module, there are three directories which are Configure, Shell and WWW. WWW contains the program files.
I did some searching and found the version of PPP-Blog used is available for download form sourceforge ( sourceforge.net/project/showfiles.php?group_id=148767&package_id=164151 ).
All the files from the sourceforge package are in the WWW folder for PPP-BLOG.MOD, plus an extra img directory.
Long story short? I think if you have any PHP scripts lying around, you could get them to run pretty quickly and easily on the Thecus box.
I also looked into the bittorrent module, and it looks a bit more fiddly. It has a Binary, Driver and System directory in addition to the other three. They're just using compiled binaries from CTorrent though ( ctorrent.sourceforge.net/?action=installation). So maybe it's not so hard to get compiled binaries running on there either?
Also - when you enable or disable a module it actually executes a script in the Shell folder. Could be an easy workaround for executing stuff in the operating system through the web interface
Also it appears the System and Driver folders in the bittorrent module are empty. To run an external application, Thecus seem to simply be using PHP to execute command line based programs and return the results. For example:
$cmd='/bin/cat "/raid/module/P2P-BT/sys/conf/'.$_GET['taskname'].'" | /bin/grep ctorrent';
$torrent_info = split(" ",trim(shell_exec($cmd)));
Just thought I'd share my experiences with playing with the module files for the N2100. I should warn everyone before they start playing - I managed to get a permanent module which won't uninstall by not TARing the files properly before uploading to my YES box.
Rather than retype everything, I'm going to cut and paste what I sent to ktula:
How did you go with the module files I sent you? I decided to do a bit of poking around with them and opened them with winrar - it turns out they are just zipped tar files. For each module there are several system directories, along with a redundant (?) TGZ of the directories and a MOD file which is just the same TGZ file renamed.
For the PPP-Blog module, there are three directories which are Configure, Shell and WWW. WWW contains the program files.
I did some searching and found the version of PPP-Blog used is available for download form sourceforge ( sourceforge.net/project/showfiles.php?group_id=148767&package_id=164151 ).
All the files from the sourceforge package are in the WWW folder for PPP-BLOG.MOD, plus an extra img directory.
Long story short? I think if you have any PHP scripts lying around, you could get them to run pretty quickly and easily on the Thecus box.
I also looked into the bittorrent module, and it looks a bit more fiddly. It has a Binary, Driver and System directory in addition to the other three. They're just using compiled binaries from CTorrent though ( ctorrent.sourceforge.net/?action=installation). So maybe it's not so hard to get compiled binaries running on there either?
Also - when you enable or disable a module it actually executes a script in the Shell folder. Could be an easy workaround for executing stuff in the operating system through the web interface
Also it appears the System and Driver folders in the bittorrent module are empty. To run an external application, Thecus seem to simply be using PHP to execute command line based programs and return the results. For example:
$cmd='/bin/cat "/raid/module/P2P-BT/sys/conf/'.$_GET['taskname'].'" | /bin/grep ctorrent';
$torrent_info = split(" ",trim(shell_exec($cmd)));