Here is my current /etc/rc.local
:
#!/bin/sh -e
# Test 1
echo line1 > /home/myHome/rclog.txt
# the mount
mount /mnt/mediaDrive &> /home/myHome/mountlog.txt
# Test 2
echo line2 >> /home/myHome/rclog.txt
exit 0
The /mnt/mediaDrive
is a noauto
in fstab
. It is a network share, hence the mount in rc.local
.
The mount in the above script does not work at boot. After boot, the rclog.txt
file contains both line1
and line2
, and the mountlog.txt
file is empty. This would indicate that all commands in the script were run successfully, however, the drive is not mounted.
Running sudo /etc/rc.local
manually in a terminal does mount the network share.
There is nothing relevant in /var/syslog
that I can see, and permissions for rc.local
are 755. The relevant fstab
entry:
//192.168.1.100/home /mnt/mediaDrive cifs noauto,credentials=/home/myHome/.mediaCredentials,uid=myName,gid=myGroup 0 0
What's going on here?