How to setup CIFS Interceptor
This article was copied from http://b-rad.cc/1041/wdlxtv-live-tips-1-mounting-nfs-under-network-shares/
Contents
Introduction
Its often requested of me to clearly detail various feature of my firmwares. Well this is the first tip in a series I’ll try and add to occasionally. The first tip deals with a feature that I have just included in WDLXTV-LIVE, which allows you to mount NFS shares under the ‘Network Shares’ category–which means you don’t have to have any local storage connected to view 1080p goodness off your NFS!! :D
This is a momentous occasion and a great feature that I am happy to finally be able to offer.
Now this trick requires a bit of a workaround. Heres how it works in a nutshell:
- You create on your NFS a samba/cifs share; any location, any password, any username
- The WD TV Live detects the CIFS share and shows it under ‘Network Shares’
- You click on the entry and enter ok for the login info (if auto-login is not enabled)
- I intercept the login and parse a file for shares to mount instead
- You are then displayed your NFS shares!!!
Setup
Ok, so now full details and a walk through.
Step 1
Set up a CIFS/Samba share on your NFS device. The share can be anything really, all its used for is a placeholder so that our desired shares can be mounted.
Step 2
Verify that the CIFS/Samba share you set up is being detected by the WD TV Live. If it is detected, move on to step 3, otherwise go back to step 1 get it set up correctly.
Step 3
SSH into your WD TV Live and execute the following:
config_tool -c CIFSINTERCEPTOR=ON
This turns the cifs-interceptor on.
Step 4
Now for the config file, which is a text file (with no extension) called: cifs-interceptor
cifs-interceptor is of the following format:
//cifs-server/share-name|NFS01 NFS01-label|NFS02 NFS02-label|...|
cifs-server | is the ip of the server where you set up the share in step 1. |
share-name | is the name of the exposed share you set up in step 1. |
NFS01 | is the full address of the first NFS< |
NFS01-label | is what you’d like the NFS01 to be mounted as |
NFS02 | is the full address of the second NFS |
NFS02-label | is what you’d like the NFS02 to be mounted as |
continue on for as many NFS as you desire to be mounted.
Here is my example /conf/cifs-interceptor
//192.168.0.104/b-rad|192.168.0.104:/media/disk slug|
This says that the share I’ll be intercepting is //192.168.0.104/b-rad and instead of mounting it I’ll be mounting 192.168.0.104:/media/disk as slug. Now note I could easily have had multiple more NFS’s listed, each must just be seperated by a pipe ‘|’.
Note the ending pipe, it is very important. Be sure to end each cifs-interceptor line with one.
cifs-interceptor needs to be uploaded by /conf, so either edit it via telnet/SSH OR ftp in and upload it directory to /conf.
When you have /conf/cifs-interceptor in place you’re ready to go.
Step 5
With CIFSINTERCEPTOR=ON and /conf/cifs-interceptor configured we can go and select the server from step 1 and *hopefully* our desired NFS shares show up instead.
NOTE:
This will ONLY intercept shares you have listed in /conf/cifs-interceptor, if its not listed in that file it will be mounted like normal. This means you can have normal CIFS/Samba shares mounted, and then a special one which will be intercepted and used to mount your selected shares under.
Tips and Hints
TIP 1:
I don’t like having to select ok every time when it asks me for username & password … since that information is irrelevant and I’d prefer it autolog me in. So to turn autologin on, telnet/SSH in and execute the following:
config_tool -c ENABLE_AUTO_LOGIN='1'
With that set any time you select the server it will automagically mount and display your NFS shares :D
TIP 2:
The shares we are mounting instead of the intercepted CIFS do not necessarily have to be NFS, they could just as easily be CIFS or anything else.
--Recliq 19:45, 2 January 2011 (UTC)