#!/bin/bash
###################################################################
#Script to configure your system based off the values in /etc/systemconfig
#Any changes made to config files will be removed when systemconfig.sh is run
#
#JM
echo $@ >/tmp/systemconfig.call
echo "----------------------start of systemconfig $@ ----------------------"
. /etc/profile
. $MV_ROOT/bin/networkconfig.sh
postfix=`cat ${BASE}/usr/local/share/mythtv/.releasetype`

for i in larch liblarch larch-profiles larch-live
do
    pacman -Q $i
    if [ $? == 0 ]
    then
        pacman -R $i --noconfirm
    fi
done

 sed -i '/larch/d' /etc/pacman.conf

systemconfig.py -m $@
rc=$?
echo "systemconfig.py exit code $rc"
exit $rc