summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/myth_settings_wrapper.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-29 20:10:02 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-29 20:10:02 (GMT)
commit822ebc824685b558d6baa1fe81d2ce58e2235808 (patch)
tree3b1d87f0954420908590e2be793c71c178d55382 /abs/core/LinHES-config/myth_settings_wrapper.sh
parent95144ae80ab0a96d02c11d4219f6841f59acf5fa (diff)
downloadlinhes_pkgbuild-822ebc824685b558d6baa1fe81d2ce58e2235808.zip
linhes_pkgbuild-822ebc824685b558d6baa1fe81d2ce58e2235808.tar.gz
linhes_pkgbuild-822ebc824685b558d6baa1fe81d2ce58e2235808.tar.bz2
LinHES config: several changes here
- added modules config_xml calling this will setup config.xml for mythtv and root user - install_db_chroot.sh will now generate the default settings and load them into a table - mv_install now calles myth_settings_wrapper.sh to load the default db
Diffstat (limited to 'abs/core/LinHES-config/myth_settings_wrapper.sh')
-rw-r--r--abs/core/LinHES-config/myth_settings_wrapper.sh29
1 files changed, 27 insertions, 2 deletions
diff --git a/abs/core/LinHES-config/myth_settings_wrapper.sh b/abs/core/LinHES-config/myth_settings_wrapper.sh
index 90d41de..6ceec7f 100644
--- a/abs/core/LinHES-config/myth_settings_wrapper.sh
+++ b/abs/core/LinHES-config/myth_settings_wrapper.sh
@@ -68,7 +68,7 @@ EOF
if [ $# -eq 0 ]
then
echo "Valid options are:"
- echo " -c (save|restore|load|uhostname|BECONFIG|ZIP|ACCESSCONTROL)"
+ echo " -c (save|save-default|restore|load|uhostname|BECONFIG|ZIP|ACCESSCONTROL)"
echo " -t (syssettings|hostsettings)"
echo " -d databasename"
echo " -h hostname"
@@ -99,11 +99,18 @@ do
then
echo "template is syssettings"
loadhost=false
+
elif [ x$Thistemplate = x"hostsettings" ]
then
echo "template is hostsettings"
Thistemplate=syssettings
loadhost=true
+
+ elif [ x$Thistemplate = x"distro_default" ]
+ then
+ echo "template is distro_default"
+ loadhost=false
+
elif [ x$Thistemplate = x"custom" ]
then
echo "template is custom"
@@ -112,6 +119,7 @@ do
exit 1
fi
;;
+
d) echo "$SWITCH" "$OPTARG"
ARG_ERR
if [ $OVERRIDE = 1 ]
@@ -156,7 +164,10 @@ case $OPERATION in
restore)
#used to restore settings from syssettings
- if [ -d $TEMPLATES/$Thistemplate ]
+ if [ x$Thistemplate = "xdistro_default" ]
+ then
+ mythutil --restore-settings --groupname distro_default
+ elif [ -d $TEMPLATES/$Thistemplate ]
then
mythutil --import-settings --infile $TEMPLATES/$Thistemplate/syssettings.xml --hostname $hostname
else
@@ -174,6 +185,19 @@ case $OPERATION in
;;
+ save-default)
+ #export settings from database to xml file
+ Thistemplate="system-default"
+ if [ ! -d $TEMPLATES/$Thistemplate ]
+ then
+ mkdir -p $TEMPLATES/$Thistemplate
+ fi
+ mythutil --export-settings --outfile $TEMPLATES/$Thistemplate/distro_default.xml --distro-default
+
+ ;;
+
+
+
load)
if [ x$Thistemplate = "xcustom" ]
then
@@ -182,6 +206,7 @@ case $OPERATION in
else
#this loads the distro default file, it's not active by any hosts
+ Thistemplate="system-default"
mythutil --import-settings --infile $TEMPLATES/$Thistemplate/distro_default.xml
fi
;;