Actions so far...
1) enabled /etc/init/mpd as you advised
2) executed /etc/init/mpd enabled && echo on on the command returned...
Start93
on on
3) executed chmod +x /etc/init.d/mpd to make sure the script has execution permission
4) Modified /etc/init.d/mpd as shown below. Added echo commands to trace my progress through the script. Echo $? was added to see if I could see a return code after executing each step.
None of these steps had any effect. I saw no echo messages related to mpd or mpc in any of the numerous reboots I executed.
I looked at ls -l /etc/init.d/ and noted that mps had the same permissions as virtually every other script in the /init.d/ directory.
I also looked at ls -l /usr/bin/. Both the mpc and mpd entries had a differnt permission from the other files. All of the others had an L or x in the first position. mpc and mpd had were both -rwxr-xr-x. Don't know if its important, but maybe it means something.
This sure seems like the mpd script is being completely bypassed... i.e., none of the code in the script is executed. So if the boot script is not hanging just before the mpd execution, it is skipping it altogether, imho.
what do you think?
Btw, I really appreciate you sticking with this. I may even pull for the Orange in the next World Cup!
Regards,
Ftaylor
Code: Select all
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=93
echo "start93"
start() {
echo "in start"
#create mpd directories
md=`grep music_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
if [ ! -d $md ]; then
mkdir -p $md
fi
pld=`grep playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
if [ ! -d $pld ]; then
mkdir -p $pld
fi
#create mpd db
/usr/bin/mpd --stdout --create-db
#optional export for mpc
#export MPD_HOST=127.0.0.1
echo "before start mpd"
#start mpd
echo "Start MPD"
/usr/bin/mpd
echo $?
sleep 5
echo "mpc repeat on"
/usr/bin/mpc repeat on
echo $?[/color]
echo "mpc volume 90"
/usr/bin/mpc volume 90
echo $?[/color]
echo "mpc load MPL"
/usr/bin/mpc load MPL
echo $?
echo "mpc play 1"
/usr/bin/mpc play 1
echo $?
#generate playlist and start to play
#/usr/bin/mpc listall | /usr/bin/mpc add -
#/usr/bin/mpc play
#/usr/bin/mpc repeat
}
stop() {
killall mpd
}