#! /bin/sh skip=150 # iMedia package upgrade system CRCsum=3297889945 MD5=00000000000000000000000000000000 label="Serial Console" script=./install targetdir=serial-console.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 : serial-console Version : 1.0 Arch : i386 Vendor : iMedia Linux Category : System Tools Target systems : common Description : Serial Console Details : Add serial console support, usually for wrap installs EOF_LSM exit 0; fi if [ "$1" = "-info" ]; then echo Identification: $label echo Target directory: $targetdir echo Uncompressed size: 32 KB echo Compression: gzip echo Date of packaging: Thu Feb 7 16:35:24 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 ,GYtU&Mi((8H ciOlB)I&(Cˤuba3gGYef8U.gDoLϽߗptc3瘞>}{}>Z,)?N|1zϗ0"8PrK%|?pH@@}Q_gƴyoUC-ٙmPno1j7;V>;w솠cNe}6ǼxWWO+YO_{EyŒؿ!o 4{L/ȟO//.tb.⢯)plt4~~WU9Tw!T`V c}Zc;w<5ہ~;TlK>]-6oc5l :ԪӳͭMw.`zv/{s3"NN~uOea adsH[)ҍ((*h3d^d2x3̥6IB%oARbL K.Awq`*T0Q6WHϯD/;&>U3w߼fϜf?6507_o˿V쵾&E2MPe -(SP eP(bQ~wO܀2AE(D}: .!-4m e\R2%H>i,Q,tuc& .,ͦ;Us2KwhYmR6 e:7PnmScU*[$8)ƿ'׊E)C:ngp0C,tO ]+߬v# $Gq?+]un -â9{wyLwy5 C›ï]^; gp7G^2Mw G7A-Wu$pb47 ~ W?$9w~IJ_K/@x5/ Xo^l8egilc< x ֻb7VrFKuu[:ʾԺ: Wf]RʿB z=RccsUZPCpm%RWm4Պ>CKP UC0Ԡ$O6U@KoJڠԇ5H JK'Z66OC=Z-X^ E?PG¨<{hjK^*5bVbDB564ZRK}38[D-.DAGIfb$_AmC-'u@kཱུ/ի}5K^GwKAAh6Jg+$Zк !wh |XEn=h ~f1i2l]o`hM5!,K. ׿EЊ6L|eiY]܂ZP-os sm1~__!s3qn&|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