01-08-2015, 01:13 PM
Thank you Wirezfree and N4RPS for the suggestions.
Along the lines of the above suggestions using sleep, someone (I think on the PCLINUX forum in the past) suggested this as a script in the rc.local file to make sure that the device was connected to the network before attempting to mount. I used this is in the past with some success, so thought it might be worth adding here:
RC.LOCAL
( until ping -q -W4 -c1 google.com &>/dev/null; do
sleep 5
done
mount /mnt/<servername>
) &
----------------------------------------
But that doesn't seem to be doing the trick for me this time, probably for the reason wirezfree says -- there's something about issuing the command once that makes it work the second time through, and I don't think it's because the wireless came up at that point.
Just in case I wasn't clear before, this is a concern for me because I use some windows programs in Crossover/wine that don't seem to work properly unless the network drive is "mounted" to the file system. I realize that's a kind of rare need, so it may not affect most people, who simply want a method of transferring files back and forth. I think, that having fully mounted through fstab may be important for programs that hold files open for a long period of time (such as database programs, perhaps).
I did some more reading on the links I posted earlier about the bug reports on mount.cifs, and that does seem related to what I am experiencing.
Again, thanks to all, and if I figure this out I will report back.
Along the lines of the above suggestions using sleep, someone (I think on the PCLINUX forum in the past) suggested this as a script in the rc.local file to make sure that the device was connected to the network before attempting to mount. I used this is in the past with some success, so thought it might be worth adding here:
RC.LOCAL
( until ping -q -W4 -c1 google.com &>/dev/null; do
sleep 5
done
mount /mnt/<servername>
) &
----------------------------------------
But that doesn't seem to be doing the trick for me this time, probably for the reason wirezfree says -- there's something about issuing the command once that makes it work the second time through, and I don't think it's because the wireless came up at that point.
Just in case I wasn't clear before, this is a concern for me because I use some windows programs in Crossover/wine that don't seem to work properly unless the network drive is "mounted" to the file system. I realize that's a kind of rare need, so it may not affect most people, who simply want a method of transferring files back and forth. I think, that having fully mounted through fstab may be important for programs that hold files open for a long period of time (such as database programs, perhaps).
I did some more reading on the links I posted earlier about the bug reports on mount.cifs, and that does seem related to what I am experiencing.
Again, thanks to all, and if I figure this out I will report back.