Open germama opened 6 years ago
Hello, I had this question and I have make bash script as:
if grep -qs '//192.168.0.3' /proc/mounts; then echo "It's mounted." else mount -a fi
and you can run script on detection in Kios configuration
Hey @constant1010,
Can you give more detailed steps how you resolved it. This can be helpful for other users. Thanks @constant1010
Hello,
sorry maybe it's not clear.
add this line for cifs parameters in /etc/fstab (server ip is 192.168.1.1)
//192.168.1.1/capture/ /data/machinery/capture cifs guest,username=constant,password=10101988,iocharset=utf8,file_mode=0640,dir_mode=0757,noperm 0 0
execute mount -a
for check if you want.
create a bash file named check.sh with execute privilege with line
if grep -qs '//192.168.1.1' /proc/mounts; then echo "It's mounted." else mount -a fi
you can run this script for check with command ./check.sh
and finally you can get on administration kios webpage, in configuration, add in io, script, with path /root/check.sh
hey @germama,
were you able to resolve your issue with the help of @constant1010's comment?
Above never worked for me in 2.7.0. or 2.8.0.
Problem is that network shares are mounted way before any network is available, so they will always fail since _netdev option doesn't work and mount them when needed.
In 2.8.0 I resoved this by:
#!/bin/bash
test -n "${OS_VERSION}" || source /etc/init.d/base``
mount_fs() {
msg_begin "Mounting network filesystems"
/bin/mount -T /etc/fstab.network -a
test $? == 0 && msg_done || msg_fail
}
case "$1" in
start)
mount_fs
;;
stop)
true
;;
*)
echo "Usage: $0 {start}"
exit 1
esac
exit $?
After next boot you should have a network share where you can save your images of videos.
Having a camera server without a possibility to save to network share is a really, really bad thing...
Hello there, First of all, really great project!
I would like to issue a "mount -a" on startup in KiOS after bootup right after the WIFI is connected in order to mount a CIFS. It sounds funny but I found no way to do that in KiOS. Do you have any hint or advice for me? Thank you very much.