I had my Toaster (D-Link DNS 323) for a while, when I first purchase it, the original purpose is to use it as a file server so I can save/backup files. Long long ago, I already knew that there is a full Wiki on the NAS itself. However I never have a close look at it.
Past week, I finally go through the Wiki page and I found out the Toaster itself is a small Unix machine which the D-Link firmware block the direct access to the box and thus make it a black box. Thanks to our open source contributors there is a fun_plug package you can download and it then will install itself and allow you to telnet in the box and thus turn the NAS from a black box to a white box. (Upon to this writing, I am on fun_plug 0.5)
Upon following the Wiki, I was able to install SSH on the Toaster and now I can have some fun. Once the ffp package is in placed and I am able to SSH tunnel into the box, I then follow another Wiki page to install the subversion server. There currently are not official tutorial/Wiki on installing the subversion with fun_plug 0.5, the Wiki itself is meant for fun_plug 0.3/0.4 (however the file structure of fun_plug 0.5 is a bit different from 0.3 & 0.4)
After digging around on the forum, I found out that in order for subversion to be installed on fun_plug0.5 first you will need the subversion package itself and in addition, you will also need the apr, apr-util and the neon packages. (Upon this writing I installed the apr-1.2.12-2, apr-util-1.2.12-1 and neon0.25.5-1)
You can either use r-sync command to pull down all the packages online
"rsync -avP inreto.de::dns323/fun-plug/0.5 ." - which it will download all the packages
You may also find all the packages under /var/packages/ (upon installed of fun_plug ffp).
Once you have located those packages, you may then use "funpkg -i *.tgz" to install all the packages.
** The above command will install ALL packages end with .tgz you only want to install the packages that I mentioned above and the subversion package (in total 4 packages). DO NO issue this command under the /var/packages/ directory, else it will install ALL packages, which you may/may not want ;)
Once you have finished installing the above packages, you may then want to copy the below code to use as the subversion.sh, which it tells the system where to located repository, and save it as /ffp/start/svnserve.sh
#!/ffp/bin/sh
# PROVIDES: svnserve
. /ffp/etc/ffp.subr
# if you wish to change the location of your repository,
# please do so in here
REPOSITORY="/mnt/HD_a2/svn/"
name="svnserve"
command="/ffp/bin/$name"
svnserve_flags="-d -r ${REPOSITORY}"
#required_dirs=${REPOSITORY}
run_rc_command "$1"
I assume you now have all the packages installed and you are ready to set up your SVN server.
Now you can follow the bottom part of this Wiki, Using the pre-compiled binaries (instructions provided by user aleck) to create your first repository.
I also found out the command joe does not help for editing the files, thus I login as root and copy those files to /mnt/HD_a2 (which is your Volume_1) and then edit in there. Because everything inside /ffp/ is the unix system and thus all access right only to root - by default. Once you have edited the conf files use the cp command to copy files back to where they were.
Once your have created your first repository you can then copy your source file to the NAS and use the SVN import command to do an initial import like below
First you should cd to your project location
root@toaster:/mnt.HD_a2//#
svn import <proj_folder_name> file:///mnt/HD_a2/<project_name>/ -m "Initial import"
svn import <proj_folder_name> file:///mnt/HD_a2/<project_name>/ -m "Initial import"
and you are all set to go, now you have create your project.
Now you can use any SVN client to get the source that you just import by nav to the repository svn://<your nas ip>/
Enjoy !
3 comments:
Thanks - helped me get this going today!
Hi,
have you figured out how to be able to svn+ssh (or svn+anyTunnelScheme) your device? I always get a "Error in child process: exec of 'ssh' failed: No such file or
directory"
I googled it, but did not find any clear answer. I know the ssh is not in the PATH, but even setting the full path to ssh /ffp/bin/ssh did not resolved the problem
Here is the [tunnels] part of my svnserve.conf
[tunnels]
ssh = /mnt/HD_a2/ffp/bin/ssh -l MyUserName
Yes you can SSH in your NAS, you should be able to hit your NAS box by SSH in to the ip address of your NAS
Post a Comment