#! /bin/sh skip=150 # iMedia package upgrade system CRCsum=4062944810 MD5=00000000000000000000000000000000 label="TELNET Server" script=./install targetdir=telnet-server.i386-package scriptargs="" keep=n finish=true; xterm_loop=; [ x"$1" = x-xwin ] && { finish="echo Press Return to close this window...; read junk"; xterm_loop=1; shift 1; } if [ x"$1" = "x-help" -o x"$1" = "x--help" ]; then cat << tac 1) Getting help or info about $0 : $0 -help Print this message $0 -info Print embedded info : title, default target directory, embedded script ... $0 -lsm Print embedded lsm entry (or no LSM) $0 -list Print the list of files in the archive $0 -check Checks integrity of the archive 2) Running $0 : $0 [options] [additionnal arguments to embedded script] with following options (in that order) -confirm Ask before running embedded script -keep Do not erase target directory after running embedded script -target NewDirectory Extract in NewDirectory tac exit 0; fi if [ x"$1" = "x-lsm" -o x"$1" = "x--lsm" ]; then cat << EOF_LSM Name : telnet-server Version : 0.1.9 Arch : i386 Vendor : iMedia Linux Category : Network Servers Target systems : common Description : TELNET Server Details : Embedded Telnet Server EOF_LSM exit 0; fi if [ "$1" = "-info" ]; then echo Identification: $label echo Target directory: $targetdir echo Uncompressed size: 40 KB echo Compression: gzip echo Date of packaging: Thu Feb 7 16:34:31 EET 2008 echo script run after extraction: $script $scriptargs [ x"$keep" = xy ] && echo "directory $targetdir is permanent" || echo "$targetdir will be removed after extraction" exit 0; fi if [ "$1" = "-list" ]; then echo Target directory: $targetdir tail -n +$skip $0 | gzip -cd | tar tvf - exit 0; fi if [ "$1" = "-check" ]; then sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` [ $sum1 -ne $CRCsum ] && { echo Error in check sums $sum1 $CRCsum exit 2; } if [ $MD5 != "00000000000000000000000000000000" ]; then # space separated list of directories [ x"$GUESS_MD5_PATH" = "x" ] && GUESS_MD5_PATH="/usr/local/ssl/bin" MD5_PATH="" for a in $GUESS_MD5_PATH; do if which $a/md5 >/dev/null 2>&1 ; then MD5_PATH=$a; fi done if [ -x $MD5_PATH/md5 ]; then md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; [ $md5sum != $MD5 ] && { echo Error in md5 sums $md5sum $MD5 exit 2; } || { echo check sums and md5 sums are ok; exit 0; } fi if [ ! -x $MD5_PATH/md5 ]; then echo an embedded md5 sum of the archive exists but no md5 program was found in $GUESS_MD5_PATH echo if you have md5 on your system, you should try : echo env GUESS_MD5_PATH=\"FirstDirectory SecondDirectory ...\" $0 -check fi else echo check sums are OK ; echo $0 does not contain embedded md5 sum ; fi exit 0; fi [ x"$finish" = x ] && finish=true if [ "$1" = "-confirm" ]; then verbose=y; shift 1; fi if [ "$1" = "-keep" ]; then keep=y; shift 1; fi if [ "$1" = "-target" -a x"$2" != x ]; then targetdir=$2; keep=y;run=n; shift 2; fi if [ "$keep" = y ]; then echo "Creating directory $targetdir"; tmpdir=$targetdir; else tmpdir="/tmp/selfgz$$"; fi location=`pwd` echo=echo; [ -x /usr/ucb/echo ] && echo=/usr/ucb/echo mkdir -p $tmpdir || { $echo 'Cannot create target directory' $tmpdir >&2 $echo 'you should perhaps try option -target OtherDirectory' >&2 eval $finish; exit 1; } $echo -n Verifying archive integrity... sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` [ $sum1 -ne $CRCsum ] && { $echo Error in check sums $sum1 $CRCsum eval $finish; exit 2; } echo OK if [ $MD5 != \"00000000000000000000000000000000\" ]; then # space separated list of directories [ x$GUESS_MD5_PATH = x ] && GUESS_MD5_PATH=\"/usr/local/ssl/bin\" MD5_PATH=\"\" for a in $GUESS_MD5_PATH; do if which $a/md5 >/dev/null 2>&1 ; then MD5_PATH=$a; fi done if [ -x $MD5_PATH/md5 ]; then md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; [ $md5sum != $MD5 ] && { $echo Error in md5 sums $md5sum $MD5 eval $finish; exit 2; } fi fi $echo -n "Uncompressing $label" cd $tmpdir [ "$keep" = y ] || trap 'cd /tmp; /bin/rm -rf $tmpdir; exit $res' EXIT if ( (cd $location; tail -n +$skip $0; ) | gzip -cd | tar xvf - | (while read a; do $echo -n .; done; echo; )) 2> /dev/null; then res=0; if [ x"$script" != x ]; then if [ x"$run" = xn ]; then #$echo "OK to execute: $script $scriptargs $* ? [Y/n] " #read yn echo "Not running autoinstall script"; rm $script #[ x"$yn" = x -o x"$yn" = xy -o x"$yn" = xY ] && { $script $scriptargs $*; res=$?; } else $script $scriptargs $*; res=$? fi [ $res != 0 ] && echo "The program returned an error code ($res)" fi [ "$keep" = y ] || { cd /tmp; /bin/rm -rf $tmpdir; } else echo "Cannot decompress $0"; eval $finish; exit 1 fi eval $finish; exit $res END_OF_STUB GZ tTEt 0qx`&$(M ?~n_ aQdfQ.wÞef&qv;ξFs$Nw&;+˹UݪU֭zO=%K~JL2s<9O; Q6Q^>u+uOv0e O4Ê?GWdG*/-?kr4JyyiYR?ް1d/PѲP=W/АU< !ST|Fī>Q";Ԝ slKզ` KhAe|BQROtQH)+W lkn< QV68;X{\N5\ 7+|D).. )E5zeR"O T.pcM1=kin^?soؿ1u2?tԲH(|cϺ6L2ҧ-Nj|YD5džp j WeY@T<堑#e1"l\mA9md13/#rQ2DCdDs&Rds^S[FYkNDQ^({@tuq$X\&mrl/s)ڼ 4T)J.yg4t߲AwFK CY*}L'9TT_jm1} c=e &;,-M"(4 Du&acrHO~OJ>Sm5]moC)cIC*,c$UJ|,q%~[ fߖ흒x,'C],Ke1]II+wL1&&qlRjYn$Kn] #m>k îm|.4޿x%~CKOB`vd!z(NeaÞP3=Imj >U,0k֠ChE"_\RgnGCaf>}2[*}-ȋ:X4W"V^t70?֑"`Uԃ7^zC}8lukP!=p7A {X=oFA5L=|!+Bn CsA;inr$fPD><jX}XUYUՕ;S qMl&slrfo82[L"Ʊ.=L%s)!EPGc#q8m2B86lشlıdžG^>qhdžl'i"q(\Ht)q,ıM'`086͙qE Ǧ$c!qGqlˉcy#kıq GЉ08k#FFg=qߍq $`1YX#W,ѱM-5:btwrLwpLQqL1{9NC4'h r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