hello. i was wondering what would cause an init.d script to not load unless the user cd'd to the /etc/init.d directory it was located manually? i am using mocp under an ubuntu 12.04 minimal console (no x, no de, or wm) and am trying to make a music jukebox (i have already tried xbmc and geexbox but i want a dedicated mp3 playback setup with basic ff/rw, skip, stop, pause, etc - nothing else). i would like mocp to start at boot from a console and i don't have x installed (don't need it). mocp itself runs superb even after resuming from suspend, but when i type:
and enter my password i get:Code:sudo /etc/init.d/mocp start
but when i manually cd to the directory typing:Code:/etc/init.d/mocp: 64: /etc/init.d/mocp: Syntax error: unexpected end of file (expecting ";;")
to go to the directory the mocp init script is in and then type:Code:cd /etc/init.d
to run it, it starts.Code:sudo mocp start
what is going on here? i wonder what part of the script is having the snafoo (if there really is a syntax error, where does the ";;" bash was expecting go?)?
here is the script if anyone wants to have a look: http://pastebin.com/gPXfRq56
thanks a bunch!