aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlcapriotti <lcapriotti@svn>2010-09-16 13:09:43 +0000
committerlcapriotti <lcapriotti@svn>2010-09-16 13:09:43 +0000
commitb1709b5011f55146ee64215e2c8e50d192a2ea8e (patch)
tree39aad6a42e56e89588a9a00defdb4d1c82dcee6e
parent8e4ed45562ecaf45f1cb3edc9cb1607f914353d7 (diff)
oops I forgot a couple of things - tested Ok in Live Dharma Beta2 installed on HDD
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33888 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--tools/XBMCLive/xbmc-live.upstart-new11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/XBMCLive/xbmc-live.upstart-new b/tools/XBMCLive/xbmc-live.upstart-new
index dfc3f9b6d0..89e197cc07 100644
--- a/tools/XBMCLive/xbmc-live.upstart-new
+++ b/tools/XBMCLive/xbmc-live.upstart-new
@@ -60,6 +60,7 @@ pre-start script
else
BOOTHOOKSDIRECTORY="/usr/share/xbmc"
fi
+ echo $BOOTHOOKSDIRECTORY > /tmp/hooksDirectory
xbmcUser=xbmc
# Read configuration variable file if it is present
@@ -97,7 +98,14 @@ script
end script
post-start script
- xbmcUser=$(getent passwd 1000 | sed -e 's/\:.*//')
+ xbmcUser=xbmc
+ # Read configuration variable file if it is present
+ [ -r /etc/default/xbmc-live ] && . /etc/default/xbmc-live
+ if ! getent passwd $xbmcUser >/dev/null; then
+ xbmcUser=$(getent passwd 1000 | sed -e 's/\:.*//')
+ fi
+
+ BOOTHOOKSDIRECTORY=$(cat /tmp/hooksDirectory)
# Executes hooks (if any) in the System "Hooks" directory
for hook in $(ls -1 $BOOTHOOKSDIRECTORY/Live-post.d/*.sh)
@@ -115,6 +123,7 @@ end script
pre-stop script
touch /tmp/noRestartXBMC
rm /tmp/xbmcliveParams
+ rm /tmp/hooksDirectory
# Clean up the console before we switch to it, to avoid text flicker
if [ -x /usr/bin/tput ] ; then