NextPVR Forums

Full Version: Where to place the mount for dvd share with WOL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sometimes I'm having problems with playing dvd's iso's on the PCH. I thought it was related to rights in W7, but I now believe it might be because of the startup script on the PCH and the combination with WakeOnLan. Here's my script:

Code:
#!/bin/sh

echo "Content-Length: 80";
echo "Content-type: text/html";
echo "";

cd ~
mkdir /etc/mvpmc >/dev/NULL
echo "";

if [ -f /etc/mvpmc/mvpmcx2 ]
  then
  echo "Already Connected!";
else  
   mount --bind  /opt/sybhttpd/localhost.drives/USB_DRIVE_A-1 /etc/mvpmc
   mkdir /mnt/D:\\Videos
   mount -t cifs //192.168.1.83/Videos /mnt/D:\\Videos/ -o username=guest,ro;
   cp /etc/mvpmc/utelnetd /usr/bin;
   cp /etc/mvpmc/ether-wake /usr/bin;
   chmod 777 /etc/mvpmc/*;
   utelnetd -l /bin/sh -p 23 &
   ln -s /lib/librmjpeg.so /lib/libjpeg.so.62
   ln -s /lib/librmzlib.so /lib/libz.so
   ln -s /lib/librmzlib.so /lib/libz.so.1
   ln -s /lib/librmzlib.so /lib/libz.so.123
   echo "Telnetd started on port 23............";
fi

ether-wake 00:24:1D:C4:A6:CA
killall gaya
sh -c /etc/mvpmc/startmeup 2>/dev/null >/dev/null &
exit 0;

This works fine if I run it the first time and my PC is on. But when the PC is off, the script tries to mount /mnt/D:\\Videos, while D:\\Videos isn't awake yet. How do I change this script to make the mount work?

Chris
The primary issue is the WOL command script is designed to work when running from on mvpmc share the first time it runs because that implies the mvpmc device is available. If you are counting on a share and the usb you need to move the move the mount of the Videos share after the copy of ether-wake and before the "fi"

Maybe add something like this

Code:
ping -c 3 192.168.1.83
if [ "$?" -ne "0" ]
  then
  ether-wake 00:24:1D:C4:A6:CA  
  sleep 20
fi

Martin
Thanks Martin, that's looking good. I'll give it a try tonight.