#! /bin/sh skip=167 # iMedia package upgrade system CRCsum=405868017 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 : Ituner Networks Corporation 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: Tue May 29 04:05:08 BOT 2007 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 if tty -s; then # Do we have a terminal? if [ x"$DISPLAY" != x -a x"$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" for a in $GUESS_XTERMS; do if which $a >/dev/null 2>&1; then XTERM=$a fi done if [ `echo "$0" | cut -c1` = / ]; then # Spawn a terminal! exec $XTERM -title "$label" -e "$0" -xwin "$@" else exec $XTERM -title "$label" -e "./$0" -xwin "$@" fi fi fi 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 [FY tT噾3!C2#$0考"`C~' d8;H&މ0M[ܵۃ[e{\;m]"Rhſ!mOs9߼|]m?SgFi)SK<[>龦>?aZ{`Zn2K'EJjXz(.>UЙ(E~= ~+ʬaۚ2W-(_F)@JE!Kԝ(UWw\#͂q\sQ (B/c Iʙθ :m%5k33^bA{/j2nXmauʩoz;7f9LӶ$XE&_JzQt xq~T* |ZG^/7/I_G/ ~+N<*pn/ S7谳5ZCjr?_3]¿Xgc-o.sM/t%ذ3Hx_3e]3 |6} 1gt4'ot=bQ+8Gr~oo|>߻Wׇր^HWV JC 4> Yz_jW!hԀOBr6IF2ovA0ƅT_}vpS7z@kIj5J!n A`F [mT7=X4i:ڼGjyjHg vM6Zo< Md,z=R/ [__xw=5RoԲ98KXzCȎIRv54R 7 q IC*2%q׳ޠz~(ګJΛH^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