Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a startup script that runs at runlevel 2 (rc2.d) and waits for $local_fs, $remote_fs, $network, $all to be initialized.

The script starts up nodejs and passes the app.js file to start. The app.js is stored on a network share /mnt/web/app.js

When the script starts up, nodejs errors out with the following error: Error cannot find module '/mnt/web/app.js'

However a dir >> /home/log before running node shows that the app.js file is there and the remote filesystem is mounted.

start_node(){
   dir /mnt/web/ >> /home/log
   /usr/local/bin/node /mnt/web/app.js &
}

How do I resolve this?

share|improve this question
    
I even did a mount -a before running node and still got the same error. –  firebird Jan 5 '12 at 0:14
    
actually mount -a during the start up script throws the mount error failure in name resolution even though I have the network share server ip in the hosts file. –  firebird Jan 5 '12 at 0:23
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.