Mount command no longer runs at boot after Live upgrade
#1
I use a central database with XBMC and I use the following command to mount a network folder that holds my thumbnails:

Code:
mount -t cifs -o file_mode=0777,dir_mode=0777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  /home/kevin/.xbmc/userdata/Thumbnails

For months I've had that line added to /etc/init.d/rc.local so it would create the mount on boot and it worked fine. This was with me running SVN 28256 Karmic.

Yesterday, I upgraded to SVN 31495 Lucid and inserting that line in /etc/init.d/rc.local no longer works to create the mount on boot. I can manually run the command from the prompt and it works fine, but it doesn't work in /etc/init.d/rc.local. I also tried putting it in /etc/rc.local and that didn't work either.

Did something change with Lucid? Where do I put that command now to create the mount on boot?
Reply
#2
What else is in the rc.local file? Please show us the whole thing.

Also, why not make an /etc/fstab entry instead?
Reply
#3
Somebody else mentioned that to me on another forum. Maybe it ios the best way. I don't know because I don't know much about Linux. Here is my entire /etc/init.d/rc.local:

Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $remote_fs $syslog $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
        if [ -x /etc/rc.local ]; then
                [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
                /etc/rc.local
                ES=$?
                [ "$VERBOSE" != no ] && log_end_msg $ES
                return $ES
        fi
}

case "$1" in
    start)
        do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

mount -t cifs -o file_mode=0777,dir_mode=0777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  /home/kevin/.xbmc/userdata/Thumbnails
Reply
#4
gsgleason Wrote:Also, why not make an /etc/fstab entry instead?

i can't see anything wrong with an rc.local approach, perhaps the network service is not loaded yet when rc.local tries this ?

gsgleason is right -- disk-mounts should be in the fstab. (it uses a diffrent syntax so dont just move this command to your fstab file ... google knows how Wink )

something like this
Code:
//192.168.1.11/storage /home/stefan/mnt/storage    cifs auto,owner,rw,username=stefan,workgroup=nettech,pa ssword=geheim,uid=500,gid=500 0 0
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply
#5
Thanks for the help guys. I tried putting this in fstab and it's still not working:

Code:
//192.168.1.20/disk7/XBMC_thumbs/Thumbnails     /home/kevin/.xbmc/userdata/Thumbnails   cifs    file_mode=0777,dir_mode=0777 0 0
Reply

Logout Mark Read Team Forum Stats Members Help
Mount command no longer runs at boot after Live upgrade0