So I have been trying to get my aios to save my network shares through nfs and have had some limited success but now need help.
Basic info:
Aios version: 3.0.1.7 R20
Aios IP: 192.168.2.17
To navigate to my windows 7 machine via network on the aios: WORKGROUP -> USERNAME-PC -> Log in with username and password -> SD_Movies HD_Movies and tv
Windows 7 machine ip: 192.168.2.13
Username: User Name (it has a space in it and I don't know if this causes problems. I used quotes and it worked via telnet)
Password: password
Shares: SD_Movies, HD_Movies, tv (these are across 3 drives so I cant share 1 root directory)
I have a windows 7 machine with 3 shares: SD_Movies, HD_Movies and tv
for now I am just trying to connect to the SD_Movies share which has two sub folders DVD and Movies.
When I telnet in, I can create the shares for the SD_Movies sub folders. Despite putting the exact same thing into f02nas1.sh I cannot get the shortcuts to automatically come up on reboot.
Here is what works with telnet. My user name does have a space in it and the output for mount does cut off the second part of "User Name" and only displays username=User)
- Code: Select all
AIOS login: AIOS login: root
BusyBox v1.1.3 (2011.09.09-05:41+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # mkdir -p /tmp/nfs
~ # mkdir -p /tmp/ramfs/volumes/SD_Movies
~ # mount -t cifs //192.168.2.13/SD_Movies -o ro,iocharset=utf8,username="User Name",password=password /tmp/ramfs/volumes/SD_Movies
~ # ln -s /tmp/ramfs/volumes/SD_Movies/DVD /tmp/nfs/DVD
~ # ln -s /tmp/ramfs/volumes/SD_Movies/Movies /tmp/nfs/Movies
~ # mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw,nodiratime)
devpts on /dev/pts type devpts (rw)
none on /sys type sysfs (rw)
none on /tmp type ramfs (rw)
/dev/mtdblock/2 on /usr/local/etc type yaffs (rw,noatime)
/dev/rd/0 on /mnt/rd type vfat (rw,nodiratime,fmask=0022,dmask=0022,codepage=cp4
37,iocharset=iso8859-1)
//192.168.2.13/SD_Movies on /tmp/ramfs/volumes/SD_Movies type cifs (ro,nodiratim
e,unc=\\192.168.2.13\SD_Movies,username=User)
~ #
My nonworking f02nas1.sh is as follows
- Code: Select all
#!/bin/sh
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
TIMEOUT=20
while [ $TIMEOUT -gt 0 ]; do
if ping 192.168.2.13; then
mkdir -p /tmp/nfs
mkdir -p /tmp/ramfs/volumes/SD_Movies
mount -t cifs //192.168.2.13/SD_Movies -o ro,iocharset=utf8,username="User Name",password=password /tmp/ramfs/volumes/SD_Movies
ln -s /tmp/ramfs/volumes/SD_Movies/Movies /tmp/nfs/Movies
ln -s /tmp/ramfs/volumes/SD_Movies/DVD /tmp/nfs/DVD
TIMEOUT=0
else
TIMEOUT=$((TIMEOUT - 1))
fi
done
IFS=$SAVEIFS
The f02nas1 permissions are set to 755
I dont know if it is relevant but I have tried to run the script manually via telnet and this is what I get
- Code: Select all
AIOS login: AIOS login: root
BusyBox v1.1.3 (2011.09.09-05:41+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # /usr/local/etc/share_favs/f02nas1.sh
-sh: /usr/local/etc/share_favs/f02nas1.sh: not found
~ # cd /usr/local/etc/share_favs
/usr/local/etc/share_favs # ls
f01nas1.sh f02nas1.sh
/usr/local/etc/share_favs #
If I then type in vi /usr/local/etc/share_favs/f02nas1.sh it will open the script and it is what I sent over ftp.
I am at my wits end and I really hope it is some stupid mistake on my part. Thanks for the help and for reading my wall of text!