diff options
Diffstat (limited to 'abs/core/keylaunch/keylaunch.install')
-rw-r--r-- | abs/core/keylaunch/keylaunch.install | 13 |
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 |