Here is HOWTO add nethostfs on Western Digital My Book World Edition. For Chinese version, visit here(中文版).
Prerequisite: Enable SSH on My Book.
Step 1. Download nethostfs v1.5 source code, unpack and compile.
[code lang="bash"]
wget http://www.snailium.net/mbwe/nethostfs15src.tar.gz
tar -xzvf nethostfs15src.tar.gz
cd nethostfs15src
make
cp nethostfs /usr/sbin
chmod 755 /usr/sbin/nethostfs
chown root:root /usr/sbin/nethostfs
[/code]
Step 2. Create shared folder /PSP/ through My Book Storage Manager.
Step 3. Create service script nethostfs under /etc/init.d/.
[code lang="bash" title="/etc/init.d/nethostfs"]
#!/bin/sh
#
# Starts or stops the nethostfs for remote PSP access.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME="nethostfs"
DESC="Remote PSP access"
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
nice -n 10 nethostfs /shares/internal/PSP &
echo "..."
;;
stop)
echo -n "Stopping $DESC: $NAME"
killall nethostfs
echo "."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop}" >&2
exit 2
esac
exit 0
[/code]
Step 4. Make start/stop link under /etc/init.d/.
[code lang="bash"]
cd /etc/init.d/
ln -s /etc/init.d/nethostfs S91nethostfs
ln -s /etc/init.d/nethostfs K09nethostfs
[/code]
Step 5. Reboot My Book World Edition
Note 1 - nice -n 10 is used in service script to adjust process priorities, in order to avoid nethostfs consumes too much CPU resource.
Note 2 - This works perfect for iRshell, as well as PPA (which uses iRshell's WiFi code)
[…] 想到正好在用 PPA 在 PSP 上通过 WiFi 看电影,干脆把 nethostfs 服务也集成到 My Book 里面好了。(English Version) […]