1. ssh로 접속(IP:.. Port:23502)

   id:root, passwd:ruamazing!

2. cd /DATA/SKAF/swpatch/patchsrc 폴더로 이동

3. FW(patch.tgz, version.txt)를 해당 위치로 복사

4. sync

5. reboot

 

하면, 부팅하면선 업그레이드 됩니다.

 

usb에 넣을때..

usb_e5030 폴더를 만들고,

usb_e5030 폴더 아래에 patch.tgz, version.txt 파일을넣고 reboot

하면 업그레이드 됩니다.

#!/bin/bash

pre=$(date +"%T")

echo "pre time : $pre"

SaveIFS=$IFS
IFS=":"
declare -a Array=($pre)
IFS=$SaveIFS

echo "Array[0]=${Array[0]}"
echo "Array[1]=${Array[1]}"
items=`echo ${Array[2]} | sed 's/^0*//'`
#echo "Array[2]=${Array[2]}"

tpre=$((${Array[0]}*60*60+${Array[1]}*60+$items))

echo "Current time for second : = $tpre"

echo $tpre > dump.tsp

tget=$(cat dump.tsp)

echo $tget

tset=$(($tget+60))
echo "tset time : $tset"

while :
do
    now=$(date +"%T")
    echo "Current time : $now"
   
    SaveIFS=$IFS
    IFS=":"
    declare -a Array1=($now)
    IFS=$SaveIFS
    items=`echo ${Array1[2]} | sed 's/^0*//'`
   
    tpre1=$((${Array1[0]}*60*60+${Array1[1]}*60+$items))
    echo "Current time for second : = $tpre1"
   
    if [ $tpre1 -ge $tset ]
    then
          echo "Current time to make a file : $tpre1 pre : $tset"
          echo $tpre1 > dump.tsp
          exit 0
    fi
   
    sleep 3

done

'Script > Bash Shell' 카테고리의 다른 글

삼성 STB 패치 방법  (0) 2012.09.07
re-direction test shell script  (0) 2012.09.06
Re-direction by shell script  (0) 2012.08.26
find 파일명만 추출  (0) 2012.08.05

#!/bin/bash 

InitialSegBuffer=1

SegmentDuration=6


server_ip_1=192.168.10.174

server_ip_2=192.168.10.175


content=/vod/Movie/AVATAR_700k.m3u8


used_svr=1


seg_url=""


result=0

file_name=""


function GetSegmentURL()

{

if [ $used_svr -eq 1 ]

then  

#echo "used_svr=$used_svr"      

seg_url=$1

else    

echo $1 > $$.tmp

sed -i "s/${server_ip_1}/${server_ip_2}/g" $$.tmp 

seg_url=`cat $$.tmp`

rm -f $$.tmp   

fi

echo "seg_url=$seg_url"        

}



function ServerStatusCheck()

{

        if [ $1 -ne 0 ]

        then        

        echo "SS error"

if [ $used_svr -eq 1 ]

then

used_svr=2

else

used_svr=1

fi

else        

        echo "wget executed successfully"

        fi


echo "SS=$used_svr ==>"

}


function GetFileName()

{

url="http://192.168.10.171/vod/Movie/AVATAR_700k_-_-_0043.ts?sid=54730"

file_name=$(basename $1)

OLDIFS=$IFS

IFS="?"

read -a array <<< "$(printf "%s" "$file_name")"

IFS=$OLDIFS

file_name=${array[0]}

}



# PID

imsi=$$.m3u8


rm -f ./*.m3u8

rm -f ../segments/*


lynx --source "http://$server_ip_1$content" >> $imsi


dos2unix $imsi


if [ -f $imsi ]

then

count=1

for imsi2 in $(awk '/http/{print}' $imsi)

do

if [ $count -gt $InitialSegBuffer ]

then

sleep $SegmentDuration

  fi

#lynx --source $imsi2 > /dev/null

while :

do

GetSegmentURL $imsi2

GetFileName $seg_url 

wget -q "$seg_url" -O "/var/www/html/test/segments/$file_name"

result=$?

if [ $result -ne 0 ]

then

ServerStatusCheck $result

usleep 1000

else

break;

fi

done

count=$(($count+1))

done

fi


rm -f $imsi



failover_client.sh


find /home/ -name '*.exe' -exec basename {} \;

$ for file in /home/*.exe; do echo `basename $file`; done

간단하다.

touch ./*

위와 같이 치자.

'Script > Set enviroment' 카테고리의 다른 글

SSH login without password  (0) 2012.02.06
SSH login without password
--------------------------

Step 1) ssh-keygen -t rsa

Step 2) ssh root@192.168.0.150 mkdir -p .ssh

Step 3) cat .ssh/id_rsa.pub | ssh root@192.168.0.150 'cat >> .ssh/authorized_keys'

'Script > Set enviroment' 카테고리의 다른 글

compile 할 때 시간 동기화 에러가 발생 하면..  (0) 2012.02.13