Finishing Up
Finishing Up
Next, we need a way to fire up the server at boot time. We'll make a new script in the normal location for Unslung startup scripts, /opt/etc/init.d/, and call it S99mediaserver. The S99 indicates that it will be one of the last servers to start up at boot time. Here's the content:
#!/bin/sh# if the server is already running if [ -n "`pidof mediaserver`" ] ; then
# kill it killall mediaserver 2>/dev/null
# give the server time to shutdown sleep 2 fi
# this is all one line, watch for line wraps! ( cd /share/hdd/data/Media; /share/hdd/data/Media/mediaserver -D >/dev/null 2>&1 )
Then mark it as executable:
chmod +x /opt/etc/init.d/S99mediaserverNext, we'll need to set up the NSLU2 to share our Media directory so that we can add content. For this we'll use the standard NSLU2 configuration screen accessed through the web interface. Go to the Administration/Advanced/Shares menu to add a new share that will point to our media directory.
In this menu, fill out the Properties section. The important item is Location. Use Disk1 and select the Specify radio button. Fill out the location as "/Media/" and hit the Save as new share button (Figure 2).
Figure 2: Setting up a Media share on the NSLU2
At this point we should have a new network filesystem share that equates to our directory that the media server will use to serve content. Network mount the directory and add some mp3 files, images or video to the appropriate sub folders. If you have any permission errors, consult the NSLU2 documentation to make sure that the appropriate network users have read/write permission.
- Previous page The Web interface
- Next page Serve it Up!
- Review: SimpleTech SimpleShare Office Storage Server
- Review: Synology DS-101 Disk Station
- ASUS 802.11g 54 Mbps WLAN Hard Drive Box Review
- Review: Revolution by Buffalo Kuro Box
- How To: Hacking the Linksys NSLU2 - Part 5- Moving to Unslung
- How To: Hacking the Linksys NSLU2 - Part 4- Customizing the Flash
- How To:Hacking the Linksys NSLU2 - Part 3 - Adding an iTunes server
- How To: Hacking the Linksys NSLU2 - Part 2 - Adding NFS
- How To: Hacking the Linksys NSLU2 - Part 1
- Linksys Network Storage Link for USB 2.0 Disk Drives reviewed