firebird
01-04-2012, 09:01 PM
I have a startup script at runlevel 2 (rc2.d) that starts nodejs on a network share. The script depends on $network, $remote_fs, $local_fs, $all.
The mount entry is in fstab and is a windows share.
start_node(){
dir >> /home/log
mount -a
/usr/local/bin//node /mnt/web/app.js &
}
The dir and mount lines are for debugging.
When the script starts up, nodejs complains that it can't find app.js. However, the dir line that runs before it shows that the file is there.
When I added the mount -a line, cifs throw an error saying the network is unreachable. How can dir log the directory contents while mount -a says the network is unreachable?
After everything loads and I login as root, if I do mount -a, everything works fine. If I run the script at that point, it works fine.
How do I resolve this?
The mount entry is in fstab and is a windows share.
start_node(){
dir >> /home/log
mount -a
/usr/local/bin//node /mnt/web/app.js &
}
The dir and mount lines are for debugging.
When the script starts up, nodejs complains that it can't find app.js. However, the dir line that runs before it shows that the file is there.
When I added the mount -a line, cifs throw an error saying the network is unreachable. How can dir log the directory contents while mount -a says the network is unreachable?
After everything loads and I login as root, if I do mount -a, everything works fine. If I run the script at that point, it works fine.
How do I resolve this?