install.sh 0000755 0000000 0000000 00000010566 12230776743 011604 0 ustar root root #!/bin/sh
# Copyright (C) 2004-2009 QVidium Technologies, Inc.
we_are_done() {
echo 0 > $DONE
cd /tmp
rm -rf $UPDATE $MD5SUM_FILE install.sh disk post_install.sh pre_install.sh
sleep 2
rm -f update.status
rm -f update.done
sync
}
# DONE file contains error code when install completes
# 0=ok, need to reboot, 1=ok to try again, 2=serious filesystem error
DONE=/tmp/update.done
cd /tmp
rm -f qvidium.pkg
UPDATE=disk-128.tar.gz
MD5SUM_FILE=disk-128.md5
uname -r | grep Xcode3 > /dev/null 2>&1
if [ $? != 0 ] ; then
echo "This update is not for this system"
we_are_done
exit 0
fi
output=`md5sum -c $MD5SUM_FILE`
if [ $? != 0 ] ; then
echo "
checksum failed on $UPDATE"
echo 1 > $DONE
exit 1
fi
echo "
$output"
WWW_DIR=/tmp/www
mkdir -p $WWW_DIR/cgi-bin
# make system_update.html our home page
cp /flash/www/system_update.html $WWW_DIR/index.html
cp /flash/www/cgi-bin/system_update.cgi $WWW_DIR/cgi-bin
[ -f /flash/etc/rc.conf ] && . /flash/etc/rc.conf
[ $WEBADMIN_PORT -lt 1 -o $WEBADMIN_PORT -gt 65535 ] && WEBADMIN_PORT=80
kill_video() {
PROGRAM=$1
DEV=$2
pidof $PROGRAM > /dev/null
if [ $? = 0 ] ; then
echo "
Stopping $PROGRAM..."
/qvidium/qvctrl $DEV quit
tries=0
pidof $PROGRAM > /dev/null
while [ $? = 0 -a $tries -lt 15 ] ; do
usleep 500000
tries=`expr $tries + 1`
pidof $PROGRAM > /dev/null
done
pidof $PROGRAM > /dev/null
if [ $? = 0 ] ; then
killall -9 $PROGRAM > /dev/null 2>&1
echo "
$PROGRAM did not stop correctly, killing with -9"
fi
fi
}
for prog in ifconfig_server echo_server tx_proxy1 tx_proxy2 rx_proxy httpd decoder_watchdog encoder1_watchdog encoder2_watchdog transcoder_watchdog sdi_watchdog
do
pidof $prog > /dev/null
if [ $? = 0 ] ; then
echo "
Stopping $prog..."
killall $prog
fi
done
# use busybox httpd to do update
ln -f -s /bin/busybox /usr/sbin/httpd
HTTP_BUSYBOX=yes
#HTTP_BUSYBOX=no
#ls -l /usr/sbin/httpd | grep busybox > /dev/null
#[ $? = 0 ] && HTTP_BUSYBOX=yes
sleep 1
echo "
Restarting httpd..."
if [ $HTTP_BUSYBOX = yes ] ; then
ln -s -f /bin/busybox /tmp/httpd
/tmp/httpd -p $WEBADMIN_PORT -h $WWW_DIR
else
if [ "$WEBADMIN_PORT" = 443 ] ; then
cp /flash/qvidium/mini_httpd.pem /tmp
SSL_ARGS="-S -E /tmp/mini_httpd.pem"
fi
cp /usr/sbin/httpd /tmp
/tmp/httpd $SSL_ARGS -u root \
-d $WWW_DIR -p $WEBADMIN_PORT \
-c '**/index.cgi|cgi-bin/*|cgi-bin/*/*'
fi
sleep 1
if [ -f pre_install.sh ] ; then
echo "
Executing pre install..."
./pre_install.sh
fi
echo "
Backing up configuration and license files..."
rm -rf /tmp/disk
mkdir /tmp/disk
mkdir /tmp/disk/flash
mkdir /tmp/disk/flash/etc
mkdir /tmp/disk/flash/qvidium
mkdir /tmp/disk/flash/qvidium/encoder
mkdir /tmp/disk/flash/qvidium/decoder
mkdir /tmp/disk/flash/qvidium/transcode
mkdir /tmp/disk/flash/conf
mkdir /tmp/disk/dropbear
cp /disk/dropbear/*host_key /tmp/disk/dropbear
cp /disk/flash/conf/iflan* /tmp/disk/flash/conf
cp -a /disk/flash/etc/* /tmp/disk/flash/etc
if [ -f /disk/flash/qvidium/rc.extra ] ; then
cp /disk/flash/qvidium/rc.extra /tmp/disk/flash/qvidium
fi
for file in /disk/flash/qvidium/*.lic
do
if [ -f "$file" ] ; then
cp $file /tmp/disk/flash/qvidium
fi
done
cp /disk/flash/qvidium/*.conf /tmp/disk/flash/qvidium
cp /disk/flash/qvidium/encoder/profile /tmp/disk/flash/qvidium/encoder
if [ -f /disk/flash/qvidium/encoder/profile2 ] ; then
cp /disk/flash/qvidium/encoder/profile2 /tmp/disk/flash/qvidium/encoder
fi
cp /disk/flash/qvidium/decoder/profile /tmp/disk/flash/qvidium/decoder
cp /disk/flash/qvidium/transcode/profile /tmp/disk/flash/qvidium/transcode
echo "
Erasing application files..."
cd /disk
rm -rf fonts dhcpd drivers dropbear flash lib gpsd pppd qvidium xc3drv disk*
sync
echo "
Installing update..."
tar xzf /tmp/$UPDATE
sync
echo "
Restoring configuration and license files..."
rm /tmp/$UPDATE
cd /tmp/disk
cp -a . /disk
sync
cd /tmp
if [ -f post_install.sh ] ; then
echo "
Executing post install..."
./post_install.sh
fi
echo "
Update finished."
rm -rf $UPDATE $MD5SUM_FILE install.sh
sync
echo 0 > $DONE
sleep 1
rm -f update.status
rm -f update.done
sleep 1
if [ -f /qvidium/rc.httpd ] ; then
ln -f -s /qvidium/rc.httpd /etc/init.d/rc.httpd
fi
/etc/init.d/rc.httpd UPDATE
rm -rf www httpd
sync
exit 0
disk-128.md5 0000644 0000000 0000000 00000000062 12230776746 011441 0 ustar root root 6847ae6ec00f08bd5ecc90429a70a093 disk-128.tar.gz
disk-128.tar.gz 0000644 0000000 0000000 00047152171 12230776746 012205 0 ustar root root cR pTuXVdaMW$dLla-0Ɗ-8q,vJkV=E+̏E B␘$u7t44C[ʉ*1Sied?0y, ;iwp?{ܟO{DWIܬ>O~թ555jkkT&pK2?Z'zam{Tw/$]G-p{[Zʈ~\ ˭:gV^o4RgfRݑTegL#NU܈q5.ih\T(j@wuFm}E'Q0FkidbViIceK$2뚮53̌ٓJfMó[ӊǘѲ]quG4a[~Cάӽ'k5RFo+x CǺ呋^D$˘;k3M2Rf2M{i3~[
uQ+JGރ~0u1 *UB0;s`o3=LBOn\5]5xr\A2"f6zPsSN5wAc'#cf
'Vxrr
V-;vR+\[ZOx>;Ț͝XSbhbŚ]$XʪbuY4z:f<~de+J3#)+agA˄K.eلi_^^s} L%WLulø(,#v\_y}thu#&mVP-[3}wͶw
71+2Nֳ]c\Q@Zǧ;z6.Fv,/uI-&S93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