I have been doing some research prior to writing a TAP to start the NFS server.
Discovery 1 - The PVR already has a copy of portmap in /bin.
This means that if portmap is started first, we can get rid of all of the stuff about "-n 2049 -m 645" and "port=2049,mountport=645". It also means that other OS clients (OS X, Linux, ?Windows?) will have a much easier time mounting the PVR's HDD directly.
Discovery 2 - There are already 3 TAPs that do something similar:
- TMSTelnetd
- KMTelnet
- StartFTPd
Although they do not start an NFS server, they start/stop standard linux daemons that allow remote access of different kinds to the PVR.
Discovery 3 - Script.tap
There is already a TAP called Script that will run 1 script when it starts and 1 script when the TAP is stopped.
In the
short term, anybody that wants to automate starting the NFS server and sharing their HDD should just install Script.tap and modify "start.sh" to start unfsd. "end.sh" should also contain "killall -9 unfsd" to avoid the "Checking HDD" message.
In the
long term, I plan to write a single TAP that can replace all of the TAPs above and be expandable to other applications in the future.
Script.tap is a wonderful idea, but it needs people to be able to firstly edit a shell script, and secondly consolidate all of their commands into a single script. For people with IT skills, this is OK, but for the average user, this may be difficult.
I propose "borrowing" the wonderful idea in Script.tap and expanding it. Instead of just 1 script, there would be many. Each of these scripts would contain specific instructions for 1 feature and be executed in alphabetical order at startup (sound familiar?). For example:
00-portmap.start, 01-telnet.start, 04-nfs.start, zz-verylast.start.
There would also be corresponding "stop" scripts.
00-veryfirst.stop, 01-telnet.stop, 99-nfs.stop, zz-portmap.stop
So with a single TAP and collection of script files, any linux daemon can be started and stopped automatically. One day we may add samba support, who knows?
There could also be standard prerequisite testing like ensuring that busybox, etc, are present, executable and perhaps even the correct version.
I realise that this is a bit off topic, but it addresses a bigger picture and consolidates a number of semi-related functions into a single TAP.
Thoughts?