summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/live-installer/install_proxy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/live-installer/install_proxy.sh')
-rwxr-xr-xabs/core-testing/live-installer/install_proxy.sh82
1 files changed, 63 insertions, 19 deletions
diff --git a/abs/core-testing/live-installer/install_proxy.sh b/abs/core-testing/live-installer/install_proxy.sh
index cd5bb31..f39b3d4 100755
--- a/abs/core-testing/live-installer/install_proxy.sh
+++ b/abs/core-testing/live-installer/install_proxy.sh
@@ -31,6 +31,26 @@ fi
}
+function apply_new_auth () {
+#check if file is present
+ if [ -f /root/myth_user_call.out ]
+ then
+ #read in file, running each command in chroot
+ exec 4</root/myth_user_call.out
+ while read LINE <&4
+ do
+ if [ ! x"$LINE" = x ]
+ then
+ #run commands in chroot
+ chroot "$mountpoint" $MV_ROOT/bin/myth_user_call -i $LINE > /tmp/user_auth.update
+ fi
+ done
+ rm -f /root/myth_user_call.out
+ else
+ echo "No new password changes to apply"
+ fi
+}
+
@@ -87,7 +107,8 @@ full_install () {
cp -f $MV_ROOT/bin/*.sh "$mountpoint"$MV_ROOT/bin/
chmod -R 755 ${mountpoint}/root
cp /etc/mtab "$mountpoint"/etc/mtab
-
+ apply_new_auth
+
if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ]
then
@@ -100,7 +121,7 @@ full_install () {
echo "stopping mysql in chroot"
chroot "$mountpoint" /etc/rc.d/mysqld stop
umount "$mountpoint/dev"
-
+
#/etc/rc.d/mysqld start
else
#update remotedb with this host settings
@@ -125,7 +146,7 @@ full_install () {
function createsquashlist(){
if [ -f $1 ]
then
- rm -f
+ rm -f
$1
fi
for i in bin boot etc home lib opt root sbin usr var
@@ -169,7 +190,7 @@ function upgrade () {
cp -fp /new_boot/etc.old/ssh/*.pub /new_boot/etc/ssh/
cp -fp /new_boot/etc.old/ssh/*.key /new_boot/etc/ssh/
cp -fp /new_boot/etc.old/ssh/*key /new_boot/etc/ssh/
-
+
#funckeys
cadir=/etc/pki/func/ca
mv /new_boot/etc/pki /new_boot/etc/pki.new
@@ -184,9 +205,9 @@ function upgrade () {
#rootfs=`grep ${disk}1 /tmp/etc/fstab |awk ' { print $3 } '`
rootfs=`grep \/\ /tmp/etc/fstab |awk ' { print $3 } '`
fi
- #datafs=`grep ${disk}3 /tmp/etc/fstab |awk ' { print $3 } '`
- datafs=`grep \/data /tmp/etc/fstab |awk ' { print $3 } '`
- $run fstab_fix_it $disk $rootfs $datafs UPGRADE
+# #datafs=`grep ${disk}3 /tmp/etc/fstab |awk ' { print $3 } '`
+# datafs=`grep \/data /tmp/etc/fstab |awk ' { print $3 } '|head 1`
+ $run fstab_fix_it $disk UPGRADE
echo "Writing boot sector" > /tmp/.install_state
progress 99
@@ -203,6 +224,10 @@ function upgrade () {
chmod -R 755 ${mountpoint}/root
chown root:mythtv "$mountpoint"/etc/systemconfig
chmod 775 "$mountpoint"/etc/systemconfig
+ #mount /proc and /dev
+ mount --bind /dev "$mountpoint/dev"
+ mount --bind /proc "$mountpoint/proc"
+
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh misc,hostype,network,advanced,this_is_install
#wrap this in a network check_network, no need to update the db if the import worked.
##### do I need to start mysql?
@@ -212,11 +237,11 @@ function upgrade () {
#Run second time
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh misc,hostype,network,advanced,this_is_install
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh advanced,this_is_install
-
- # fi
-
+ umount "$mountpoint/dev"
+ umount "$mountpoint/proc"
echo "Done" > /tmp/.install_state
cp /tmp/mythvantage_install.log $mountpoint/var/log/
+
$run unmount_it $disk
}
@@ -267,7 +292,7 @@ ip address flush dev eth0
# echo "using netboot"
# USEVNC=0
# fi
-#
+#
# else
# echo " using vnc"
# fi
@@ -280,7 +305,7 @@ ip address flush dev eth0
# then
# exit 1
# fi
-#
+#
# if [ ! x$USEVNC = x0 ]
# then
# echo "Resetting the network"
@@ -298,17 +323,17 @@ ip address flush dev eth0
# echo "nameserver $nameserver" > /etc/resolv.conf
# return 0
# fi
-#
+#
# if [ $UseDHCP = 1 ]
# then
-#
+#
# /sbin/ifconfig $DEVICE $ip
# /sbin/route add default gw $route
# echo "nameserver $nameserver" > /etc/resolv.conf
-#
+#
# fi
-#
-#
+#
+#
# }
function SANE_SYSETTINGS () {
@@ -422,11 +447,30 @@ echo "-----------------------------------------------------------------------3--
fi
;;
host_names)
- host $hostname
- if [ $? = 0 ]
+ #if host is found, then check to see if it's online
+ #if not online, assume it's ok to use this hostname
+
+ hout=`host $hostname`
+ status=$?
+ #found host, now grab the ip
+ if [ $status = 0 ]
+ then
+ hoip=`echo $hout|awk '{print $4}'`
+ ping -c 1 $hoip
+ if [ $? = 0 ]
+ then
+ status=0
+ else
+ status=1
+ fi
+ fi
+
+ if [ $status = 0 ]
then
exit 7
fi
+
+
;;
esac