summaryrefslogtreecommitdiffstats
path: root/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools/archiso-19/mythvantage/airootfs/root/linhes_install')
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh49
-rw-r--r--build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh5
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh120
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/airootfs/root/linhes_install/startx35
4 files changed, 209 insertions, 0 deletions
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh
new file mode 100755
index 0000000..2b0cdb2
--- /dev/null
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#redirect stderr to stdout, then rediret stdout to file
+. /etc/profile
+exec 2>&1
+exec > /tmp/mythvantage_install.log
+#/usr/bin/nvidia-settings -a InitialPixmapPlacement=2
+#keylaunch &
+#/usr/bin/tilda &
+#/usr/X11R6/bin/unclutter -root -idle 0 -jitter 400 -noevents &
+export MALLOC_CHECK_=0
+
+WM="e16 -P /usr/share/wm_data/e16_config_dir/"
+$WM &
+pid=$!
+
+xset s off
+xset -dpms
+xhost +
+xdotool mousemove 0 0
+
+cp -f /etc/keylaunchrc /root/.keylaunchrc
+/usr/bin/keylaunch &
+
+
+CMDLINE=$(cat /proc/cmdline)
+echo $CMDLINE |grep -q nfsroot
+NFSROOT=$?
+echo $CMDLINE |grep -q clean_upgrade
+if [ $? = 0 ]
+then
+ export CLEAN_UPGRADE=YES
+else
+ export CLEAN_UPGRADE=NO
+fi
+
+#show the readme
+MythVantage -r
+
+if [ x$NFSROOT = x1 ]
+then
+ unbuffer MythVantage -L &
+else
+ NETBOOT=YES MythVantage &
+fi
+
+
+wait $pid
+
+
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh
new file mode 100644
index 0000000..6d86635
--- /dev/null
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+killall -9 X
+killall -9 xinit
+killall -9 e16
+killall -9 MythVantage
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh
new file mode 100755
index 0000000..83224b7
--- /dev/null
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh
@@ -0,0 +1,120 @@
+#!/bin/bash
+#
+# /etc/rc.local: Local multi-user startup script.
+#
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+. ${MV_ROOT}/bin/install_functions.sh
+umount /tmp
+clear
+
+
+ln -s /var-lib-pacman/sync /var/lib/pacman/sync
+
+function mysql_check {
+ mysql -e "show databases;" 2>/dev/null >/dev/null
+ return $?
+}
+
+function mythconverg_check {
+ mysql mythconverg -e "describe settings;" 2>/dev/null >/dev/null
+ return $?
+}
+
+function install_db {
+ pacman --noconfirm -R mythdb-initial 2>/dev/null > /dev/null
+ pacman -S --noconfirm mythdb-initial 2>/dev/null > /dev/null
+}
+
+
+#set bootdev.txt for shutdown eject in archiso_shutdown
+mount|grep bootmnt|cut -f1 -d" " > /run/initramfs/bootdev.txt
+cp -f /usr/bin/eject /run/initramfs/usr/bin/eject
+
+#check to see if mysql is running
+stat_busy "Checking Mysql"
+ATTEMPT=0
+mysql_check && printhl " Installing the initial database" &&install_db
+mythconverg_check
+status=$?
+while [ ! $status = 0 ]
+do
+ #/etc/rc.d/mysqld start
+ systemctl start mysqld.service
+ mysqlstatus=$?
+ if [ $mysqlstatus = 0 ]
+ then
+ mysql_check && install_db
+ mythconverg_check
+ status=$?
+ else
+ ((ATTEMPT=ATTEMPT+1))
+ systemctl stop mysqld.service
+ #/etc/rc.d/mysqld stop
+ sleep 2
+ fi
+ if [ $ATTEMPT = 20 ]
+ then
+ printhl " Could not start mysql or install mythconverg within 20 attempts"
+ printhl " Aborting install"
+ exit 20
+ fi
+done
+stat_done
+
+#check network parms
+stat_busy "Checking network"
+init_network
+stat_done
+
+stat_busy "Probing network"
+request_dhcp &
+stat_done
+
+#save some cmdline options
+stat_busy "Parsing command line"
+parse_cmdline_2_db
+bootsplash_setup
+stat_done
+
+#search for remote
+stat_busy "Checking for remote"
+init_remote
+stat_done
+printhl "Finished"
+
+#creating /myth for live cd
+. /usr/MythVantage/bin/mv_config.py
+HDIR=`dirname $MYTHHOME`
+mkdir -p $HDIR
+useradd -b $HDIR -m -p "" -G "audio,disk,optical,wheel,storage,video,users" mythtv
+chown -R mythtv.mythtv $MYTHHOME
+#creating mountpoint for live cd
+mkdir -p $DATAMOUNT
+create_media_dirs.sh $DATAMOUNT
+chown -R mythtv.mythtv $DATAMOUNT/media
+
+
+
+printhl "Finished"
+systemctl start dbus
+systemctl start avahi-daemon
+
+echo $CMDLINE | grep -qi NoX
+if [ $? = 0 ]
+then
+ echo ""
+ printhl "No auto X option found"
+ # /usr/bin/chvt 2
+else
+ #/root/linhes_install/startx &
+ systemctl start linhes-install
+fi
+
+# Set up automatically logged in user
+if [ -f /.livesys/autologin ]; then
+ cp /.livesys/autologin /tmp/newuser
+fi
+
+
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/startx b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/startx
new file mode 100755
index 0000000..6503bf7
--- /dev/null
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/startx
@@ -0,0 +1,35 @@
+#!/bin/bash
+. /etc/profile
+
+export USER=root
+export HOME=/root
+
+CMDLINE=$(cat /proc/cmdline)
+TEMPVAR=${CMDLINE#*ip=}
+IP=${TEMPVAR%% *}
+echo $CMDLINE |grep -q vnc
+USEVNC=$?
+
+if [ x$USEVNC = x1 ]
+then
+ RUNP=1 $MV_ROOT/bin/xconfig.sh 2>/dev/null
+ startx /root/linhes_install/LinHES-install.sh -- -logverbose 6 -allowMouseOpenFail 2>/tmp/x.log
+else
+ #VNC
+ pacman -S --force --noconfirm tigervnc
+ systemctl start dbus
+ cp -f $TEMPLATES/vnc.service /etc/avahi/services/
+ systemctl start avahi-daemon
+ cd /root
+ mkdir .vnc
+ echo 54321 |vncpasswd -f > /root/.vnc/passwd
+ chmod 500 /root/.vnc/passwd
+ rm -f /root/.vnc/xstartup 2>/dev/null
+ ln -s /root/linhes_install/LinHES-install.sh /root/.vnc/xstartup
+ vncserver
+ echo "The VNC server password is: 54321"
+ echo "Please connect to one of these ip's"
+ echo "-------------------------------------------"
+ ip addr show |grep "inet" |grep -v inet6|cut -d\/ -f1
+ echo "-------------------------------------------"
+fi