diff options
author | ceros7 <ceros7@svn> | 2010-10-08 19:45:10 +0000 |
---|---|---|
committer | ceros7 <ceros7@svn> | 2010-10-08 19:45:10 +0000 |
commit | f3d099955f13f687ccfc512dffd0d1ed47646c2f (patch) | |
tree | e33e1f5443cbd83dec1a9a1eb985fc1fe5edaceb /tools/Linux | |
parent | 723d5e707a3b553a7976fc5bfd44625fd3faa949 (diff) |
Only execute hooks if hooks directory is found.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34573 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools/Linux')
-rw-r--r-- | tools/Linux/packaging/debian/xbmc-live.upstart | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/Linux/packaging/debian/xbmc-live.upstart b/tools/Linux/packaging/debian/xbmc-live.upstart index 5546a428ea..618ca50738 100644 --- a/tools/Linux/packaging/debian/xbmc-live.upstart +++ b/tools/Linux/packaging/debian/xbmc-live.upstart @@ -62,16 +62,20 @@ pre-start script fi # Executes pre-hooks (if any) in the System "Hooks" directory - for hook in $(find $BOOTHOOKSDIRECTORY/live.d -type f -perm /u=x,g=x,o=x | sort) - do - $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS - done + if [ -d $BOOTHOOKSDIRECTORY/live.d ]; then + for hook in $(find $BOOTHOOKSDIRECTORY/live.d -type f -perm /u=x,g=x,o=x | sort) + do + $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS + done + fi # Executes pre-hooks (if any) in the user "Hooks" directory - for hook in $(find /home/$xbmcUser/.xbmc/live.d -type f -perm /u=x,g=x,o=x | sort) - do - $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS - done + if [ -d /home/$xbmcUser/.xbmc/live.d ]; then + for hook in $(find /home/$xbmcUser/.xbmc/live.d -type f -perm /u=x,g=x,o=x | sort) + do + $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS + done + fi if [ -f /home/xbmc/.xsession ] ; then rm /home/xbmc/.xsession |