team-xbmc team mailing list archive
-
team-xbmc team
-
Mailing list archive
-
Message #00118
Re: Upstart script very buggy
Hi Rohde,
tks for taking your time for debugging the upstart script.
for hook in $BOOTMEDIAMOUNTPOINT/Hooks/*.sh
do
# Added for debugging
echo "Hook activated" >> /root/xbmcLog
echo "Current hooker: ${hook}\n" >> /root/xbmcLog
cp $hook /root/hook.sh
chmod 0755 /root/hook.sh
/root/hook.sh
rm -f /root/hook.sh
done
echo "After hooks Dir" >> /root/xbmcLog
this fails, and no wonder wither, since ${hook} is set to "/Hooks/*.sh"
on my system. I also discovered that $BOOTMEDIAMOUNTPOINT will be empty
on my system
This has been fixed already in the SVN and the XBMCLive beta1 already
includes the fix. Next PPA will include the fix as well.
if [ ! $(grep -i autostart /tmp/xbmcliveParams) ] ; then
# More debug info
echo "autostart fails" >> /root/xbmcLog
exit
fi
If I look through the code it looks like I'm expected to set a autostart
parameter from the console,
the autostart parameter comes from the kernel cmdline:
18 CMDLINE=$(cat /proc/cmdline)
19
20 #Process command line options
21 XBMC_PARAMS=""
22 for i in ${CMDLINE}; do
23 case "${i}" in
24 xbmc\=*)
25 XBMC_PARAMS=$(get_opt $i)
26 ;;
27 esac
28 done
29 echo $XBMC_PARAMS > /tmp/xbmcliveParams
that is copied to the tempfile for the upstart job to execute some tasks
as early as possible.
As per the grep line modify it as
if [ ! "$(grep -i autostart /tmp/xbmcliveParams)" ] ; then
or
if ! grep -i -q autostart /tmp/xbmcliveParams ; then
And you will be good (already fixed in SVN).
I don't think this is actually related to the upstart script, but I was
wondering if you are aware that neither shutdown nor restart works at
the moment.
right, not related to upstart job; rather an issue of policykit setup on
your system (just guessing).
Luigi
References