summaryrefslogtreecommitdiffstats
path: root/abs/core/keylaunch/keylaunch.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-09-23 19:44:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-09-23 19:44:16 (GMT)
commit4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446 (patch)
tree9bbb13e773893d72bd80edd9ba7bf229a710cce3 /abs/core/keylaunch/keylaunch.install
parent0328daea42c752673f9268408e7ec96308c5852a (diff)
downloadlinhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.zip
linhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.tar.gz
linhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.tar.bz2
keylaunch: keylaunch.install: check if mythtv home exist before creating symlink
Diffstat (limited to 'abs/core/keylaunch/keylaunch.install')
-rw-r--r--abs/core/keylaunch/keylaunch.install13
1 files changed, 8 insertions, 5 deletions
diff --git a/abs/core/keylaunch/keylaunch.install b/abs/core/keylaunch/keylaunch.install
index faa176b..87f8fde 100644
--- a/abs/core/keylaunch/keylaunch.install
+++ b/abs/core/keylaunch/keylaunch.install
@@ -9,13 +9,16 @@ pre_install() {
# arg 1: the new package version
post_install() {
MHOME=`cat /etc/passwd | grep "mythtv" | cut -d":" -f6`
- if [ ! -e $MHOME/.keylaunchrc ]
+ if [ ! -z $MHOME ]
then
- echo "setting symlink for keylaunch"
- ln -s /etc/keylaunchrc $MHOME/.keylaunchrc
+ if [ ! -e $MHOME/.keylaunchrc ]
+ then
+ echo "setting symlink for keylaunch"
+ ln -s /etc/keylaunchrc $MHOME/.keylaunchrc
+ fi
+ echo "updating .keylaunchrc to run mythtv-setup as user"
+ sed -i 's/key=..*s:sudo\ \/usr\/bin\/mythtv-setup/key=..*s:\/usr\/bin\/mythtv-setup/g' $MHOME/.keylaunchrc
fi
- echo "updating .keylaunchrc to run mythtv-setup as user"
- sed -i 's/key=..*s:sudo\ \/usr\/bin\/mythtv-setup/key=..*s:\/usr\/bin\/mythtv-setup/g' $MHOME/.keylaunchrc
}
# arg 1: the new package version