Category Archives: Uncategorized

Installing Subversion on the PogoPlug

After converting the PogoPlug to run arbitrary programs, I was able to install subversion and manually run svnserve as a daemon (it’s in the manual, just run “svnserve -d”), but having to remember to do that after every boot is a nuisance.

A Google search for install svnserve as a daemon turned up instructions for setting up svnserve on Ubuntu, as well as a few scripts.  Obviously PlugBox Linux isn’t Ubuntu, but it was a step in the right direction.  Installing httpd during the initial PogoPlug hack had already introduced me to the /etc folder, the rc.conf file, and the rc.d subfolder.

Poking around in rc.d, I discovered the httpd startup script.  So now I knew where my svnserve script needed to go.  The Ubuntu setup instructions included several helpful bash scripts in the comments, my next step was to run “view httpd” and verify that it was also a bash script.  Knowing that, I could just use the new script verbatim.

Then I listed the files in /etc/rc.d and discovered that one of them was named svnserve.  Sonuvagun, the svn package included a script!

So in the end, all I had to do was go to /etc and edit rc.conf.  The very last line in the file is DAEMONS=(…).  All I had to do was add svnserve to the list.

Well… that was actually the next to last thing.

After rebooting (“shutdown -r now”), TortoiseSVN would connect to the svn server, but it couldn’t find my repository atsvn://plugbox/test.  I’d forgotten that by default, svnserve serves up repositories in any directory on the entire machine.  My test repository was now located at svn://plugbox/media/external_drive/Subversion/test.

To go back to a short URL, I went to /etc/conf.d,  edited svnserve, and set

SVNSERVE_ARGS=”-r /media/external_drive/Subversion/”

Next I ran

/etc/rc.d/svnserve stop

followed by

/etc/rc.d/svnserve start

and voila! My repository was back at svn://plugbox/test

Experimenting with the PogoPlug

I’ve had a PogoPlug for a little more than a year.

The pluses to the device are:

  • It’s an easy way for a home user to convert old drives into network attached storage
  • You can access your files from anywhere you have an internet connection.
  • Drives connected to the device appear as local drives (even across the internet).
  • It can convert video files to play on (supposedly) any device.

There are some down sides too:

  • The video conversion is slow (not completely unexpected with a low-power, always-on device)
  • The client software requires a new login after every boot.
  • The attached drive sometimes “disappears” until you tell the software to “reload” it.
  • My experience with the Android application has been that it’s a bit flaky.

All in all, it’s an interesting device and I can definitely see where home users might find it useful if they’re comfortable with the fact that you need to login via a third-party service (the My PogoPlug service), even when you’re accessing it a home.  (If Cloud Engines ever goes out of business, PogoPlug owners may find themselves with an unusable device.)

Part of my reason for acquiring the PogoPlug in the first place was that it seemed like a potentially inexpensive way to accomplish a few things on my home network:

  1. File sharing between my various computers.
  2. Running a private web server I could access without switching the main computer on.
  3. Running a private subversion server.

Goal 1 was easy enough to accomplish straight out of the box.  Goals 2 and 3 were going to take some work.

When I finally decided to hack the PogoPlug, a Google search led me to LifeHacker’s tutorial on turning the device into a “Full-Featured Linux Web Server.”  It was a good starting place, but in the end I decided to follow the source instructions from PlugApps.com.   (CAUTION: As it says on the PlugApps instructions, hacking your PogoPlug will void the warranty.)

My initial install was onto a 4GB SanDisk Cruzer flash drive.  The initial reboot came up fine, but later boots tended to come back to PogoPlug Linux,  which after the first steps of the install would no longer connect to the MyPogoPlug service. If I manually mounted and mounted the thumb drive  before running /sbin/reboot, that would take me over to PlugBox Linux, but going through those steps repeatedly is a pain.  I reran the install for PlugBox Linux using a no-name 16GB drive and it’s been working reliably ever since  (I love that storage has become so cheap that I had a 16GB drive “just laying around”).

To accomplish Goal #1 (file sharing), I installed Samba.  It works like a champ and I’ve been able to back to doing my backups to a network drive.

To accomplish Goal #2 (private web sever), LifeHacker’s instructions did the job.  By default, the web site is served out of /srv/http, and there’s also an ftp site in /srv/ftp.

Goal #3 took some guesswork. I didn’t see any mention of Subversion on PlugApps, but I made a guess and ran  pacman -Sy subversion.  I haven’t got around to setting up svnserve to run as a daemon at boot time, but it’s running right now.  (Getting it set up as a daemon will require putting a script in /etc/rc.d/ and adding it to the list of daemons at the end of /etc/rc.conf.)

So mission accomplished.  Not bad for a $100 device.