aboutsummaryrefslogtreecommitdiff
path: root/tools/XBMCLive/runXBMC
diff options
context:
space:
mode:
authorlcapriotti <lcapriotti@svn>2009-11-25 11:37:59 +0000
committerlcapriotti <lcapriotti@svn>2009-11-25 11:37:59 +0000
commit1389e8e177baf8346c4dda7fbc86d94a87bcb069 (patch)
tree8351ebaa419c512a799ebca7c9b1eddd6e38f447 /tools/XBMCLive/runXBMC
parent8679c14322771d84b4fca920a7cad450d1d7c00a (diff)
configurable user for xbmc-live, defaulting to "xbmc" if found - tks wstewart
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25012 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools/XBMCLive/runXBMC')
-rwxr-xr-xtools/XBMCLive/runXBMC15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/XBMCLive/runXBMC b/tools/XBMCLive/runXBMC
index 41adb19311..0dc09771e7 100755
--- a/tools/XBMCLive/runXBMC
+++ b/tools/XBMCLive/runXBMC
@@ -8,10 +8,17 @@ fi
while true
do
if [ "$(whoami)" == "root" ] ; then
- xbmcUser=$(getent passwd 1000 | sed -e 's/\:.*//')
- if [ -z "$xbmcUser" ]; then
- echo "User for XBMC not found, exiting..."
- break
+ 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/\:.*//')
+ if [ -z "$xbmcUser" ]; then
+ echo "User for XBMC not found, exiting..."
+ break
+ fi
fi
else
xbmcUser=$(whoami)