diff options
author | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
commit | 2648e999d277eac5c3d331a3609bcc73fafbea71 (patch) | |
tree | 40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/tweaker/bin/create-linhes-sql.sh | |
parent | c759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff) | |
parent | 7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff) | |
download | linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2 |
Merge branch 'testing'
# By James Meyer (1091) and others
# Via James Meyer (5) and others
* testing: (1148 commits)
LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish
Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web
LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables.
xf86-video-ati: xorg ati driver.
LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE.
LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop.
e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers.
LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902
zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to
linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink
runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr
LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900
iguanair: rebuild with python 2.7
LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first.
linhes-udev-rules: add rules for mce,streamzap,serial lirc devices.
mythinstall: recompile for matching libs
mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager
linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist
LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV
linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/
...
Diffstat (limited to 'abs/core/tweaker/bin/create-linhes-sql.sh')
-rwxr-xr-x | abs/core/tweaker/bin/create-linhes-sql.sh | 166 |
1 files changed, 0 insertions, 166 deletions
diff --git a/abs/core/tweaker/bin/create-linhes-sql.sh b/abs/core/tweaker/bin/create-linhes-sql.sh deleted file mode 100755 index 478eed0..0000000 --- a/abs/core/tweaker/bin/create-linhes-sql.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -# Written by Bob Igo from the MythTV Store at http://MythiC.TV -# Email: bob@stormlogic.com -# -# If you run into problems with this script, please send me email - -# PURPOSE: -# -------------------------- -# This script automates the creation of a new LinHES.sql based -# on the contents of the current mythconverg database. - -if [ `whoami` != "root" ]; then - echo "This script must be run as root." - exit -1 -fi - -# Every file we may create, edit, or delete -########################################### -export LINHES_SQL_PROTOTYPE=/data/database/LinHES.sql-new -export MYTHTV_SQL_OLD=/data/database/LinHES.sql-backup -export TMPFILE=/tmp/LinHES.sql-tmp - -echo "" -echo " ** ONLY CESMAN SHOULD EVER NEED TO RUN THIS SCRIPT **" -echo "" -echo " WARNING: This will archive your mythconverg database to a file," -echo " then delete mythconverg from MySQL. It will then launch mythbackend" -echo " to repopulate mythconverg, with a goal of creating the smallest-possible" -echo " mythconverg database that MythTV can load without complanining." -echo " Every attempt will be made to restore your original database, but" -echo " ***no guarantee is made***." -echo "" -echo " ** ONLY CESMAN SHOULD EVER NEED TO RUN THIS SCRIPT **" -echo "" - -echo -n "Proceed? [y|N] " -read FEAR - -if [ "$FEAR" != "y" ] && [ "$FEAR" != "Y" ]; then - echo "***NO OPERATION WILL BE PERFORMED***" - exit -fi - -# Archive the current mythconverg table from the MySQL database: -echo "DROP DATABASE IF EXISTS mythconverg; CREATE DATABASE mythconverg; USE mythconverg;" > $MYTHTV_SQL_OLD -mysqldump mythconverg >> $MYTHTV_SQL_OLD - -# delete the mythconverg database from MySQL -killall mythbackend -mysql -e "DROP DATABASE IF EXISTS mythconverg; CREATE DATABASE mythconverg;" - -mythtv-setup --geometry 640x480 2>&1 > /dev/null & - -echo "*" -echo "* 1) PICK ANY LANGUAGE WHEN PROMPTED." -echo "* 2) AGREE TO THE SCHEMA UPGRADE." -echo "* 3) PRESS ENTER HERE WHEN THE MYTHTV-SETUP MENU LAUNCHES." -echo "*" -read KEYPRESS - -mysql -e "USE mythconverg; \ -INSERT INTO settings VALUES ('SecurityPin','0000','"`hostname`"'); \ -INSERT INTO settings VALUES ('BackendServerIP','127.0.0.1','"`hostname`"'); \ -INSERT INTO storagegroup VALUES ('\N', 'Default','"`hostname`"','/');" - -echo "*" -echo "* 1) EXIT MYTHTV-SETUP" -echo "* 2) PRESS ENTER HERE WHEN READY TO CONTINUE." -echo "*" -read KEYPRESS - -# let mythbackend repopulate mythconverg from scratch -mythbackend 2>&1 > /dev/null & -sleep 3 - -mythfrontend --geometry 640x480 2>&1 > /dev/null & -echo "*" -echo "* 1) EXIT MYTHFRONTEND" -echo "* 2) PRESS ENTER HERE WHEN READY TO CONTINUE." -echo "*" -read KEYPRESS - -killall mythfrontend -killall mythbackend - -# save off the mostly-pristine MythTV myconverg database -# (It would be 100% pristine, but mythbackend won't run unless BackendServerIP is given a value, -# and both mythtv-setup and the mythfrontend won't proceed until you've picked a language.) - -# Edit the pristine MythTV mythconverg database so that we can use it to prime -# the database during a semi-automated LinHES installation. - -SQL_FILENAME=$LINHES_SQL_PROTOTYPE - -# load our library functions -. /usr/LH/tweaker/bin/SQLtweaker.sh -# -echo "*" -echo "* Writing $LINHES_SQL_PROTOTYPE..." -echo "*" -# -echo "/*" > $LINHES_SQL_PROTOTYPE -echo " * MythTV raw SQL creation file." >> $LINHES_SQL_PROTOTYPE -echo " */" >> $LINHES_SQL_PROTOTYPE -echo "" >> $LINHES_SQL_PROTOTYPE -echo "-- #################################################################### --" >> $LINHES_SQL_PROTOTYPE -echo "-- Drop any initial database:" >> $LINHES_SQL_PROTOTYPE -echo "DROP DATABASE IF EXISTS mythconverg;" >> $LINHES_SQL_PROTOTYPE -echo "" >> $LINHES_SQL_PROTOTYPE -echo "-- #################################################################### --" >> $LINHES_SQL_PROTOTYPE -echo "-- Create an empty new database:" >> $LINHES_SQL_PROTOTYPE -echo "CREATE DATABASE mythconverg;" >> $LINHES_SQL_PROTOTYPE -echo "GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY \"mythtv\";" >> $LINHES_SQL_PROTOTYPE -echo "FLUSH PRIVILEGES;" >> $LINHES_SQL_PROTOTYPE -echo "GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY \"mythtv\";" >> $LINHES_SQL_PROTOTYPE -echo "FLUSH PRIVILEGES;" >> $LINHES_SQL_PROTOTYPE -echo "USE mythconverg;" >> $LINHES_SQL_PROTOTYPE -echo "" >> $LINHES_SQL_PROTOTYPE -echo "-- #################################################################### --" >> $LINHES_SQL_PROTOTYPE -echo "-- Create all the tables:" >> $LINHES_SQL_PROTOTYPE -echo "" >> $LINHES_SQL_PROTOTYPE - -# Dump the database, removing all unneeded DB inserts - when LinHES launches mythtv-setup and mythfrontend, -# anything undefined will be given default values by the applications, except for the INSERTs below. -mysqldump mythconverg | sed -e "s/`hostname`/MythTVhost'/g" -e "s/AUTO_INCREMENT=[0-9]* //g" > $TMPFILE -grep -v "INSERT INTO" $TMPFILE >> $LINHES_SQL_PROTOTYPE -sed "s/,(/,\n(/g" $TMPFILE | grep DBSchema | sed "s/\(.*\)NULL),/INSERT INTO settings VALUES \1'MythTVhost');/g" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('SecurityPin','0000','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('BackendServerIP','127.0.0.1','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('MasterServerIP','127.0.0.1','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('MasterServerPort','6543','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('Theme', 'LinHES','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO settings VALUES ('HostMyhostname', 'type_hostname_here','MythTVhost');" >> $LINHES_SQL_PROTOTYPE -echo "INSERT INTO storagegroup VALUES ('\N', 'Default','MythTVhost','/');" >> $LINHES_SQL_PROTOTYPE - -rm $TMPFILE - -# -echo "*" -echo "...DONE" -echo "*" -# - -echo "*" -echo "* PRESS ENTER HERE WHEN READY TO RESTORE THE OLD DATABASE" -echo "* AND RE-LAUNCH MYTHBACKEND" -echo "*" -read KEYPRESS - -# -echo "Restoring original database from $MYTHTV_SQL_OLD..." -# -# Restore the original mythconverg database -cat $MYTHTV_SQL_OLD | mysql 2>&1 > /dev/null -# -echo "...DONE" -# - -# -echo "restarting mythbackend..." -# -mythbackend & -# -echo "...DONE" -# |