标题: 如何给compaq 5302升级固件 [打印本页] 作者: goldhawk 时间: 2007-12-30 00:59 标题: 如何给compaq 5302升级固件 如题,请指教. 操作系统xp,用了一个hp for window下刷新固件程序,一开就兰屏; 在hp管网上找dos下升级程序,怎么文件都不可用?显示: ftp://ftp.hp.com/pub/products/servers/supportsoftware/cp004501-005000/cp004858.scexe
文件内容:
#!/bin/sh
#!scexe
##############################################################
# (C) 2001 COMPAQ COMPUTER CORPORATION #
##############################################################
if test -n "$ZSH_VERSION"; then
emulate sh
NULLCMD=:
fi
_SKIP=206
_INTERFACE_VERSION=scexe-interface-1.02-16
_INSTALLER=cpqsetup
###############
# Script Die
###############
Die()
{
rm -rf $_TMPFILE $_TMPDIR;
exit $@;
}
###############
# Script Unpack
###############
Unpack()
{
_UNPACK_DIR=$1
#if the directory exists we can proceed. If not, create it.
if test -d $_UNPACK_DIR; then #if the FILE exists AND is a direcotry...
: #do nothing
else
if test -f $_UNPACK_DIR; then #the FILE exists but isn't a directory
echo "$0: File already exists: $_UNPACK_DIR" >&2;
Die 3;
else #if the FILE does not exist...
mkdir -p $_UNPACK_DIR ||
{
echo "$0: cannot create directory $_UNPACK_DIR" >&2;
Die 3;
}
fi
fi
_TMPFILE=`mktemp $_UNPACK_DIR/sc$$.XXXXXX` ||
{
echo "$0: cannot create a temporary file" >&2
Die 3;
}
if tail +$_SKIP $0 | gzip -cd > $_TMPFILE; then
if test $_UNPACK = 1; then
{
#if _UNPACK is set then be verbose and don't overwrite anything.
tar --no-same-owner -xkvf $_TMPFILE -C $_UNPACK_DIR;
}
else
{
tar --no-same-owner -xf $_TMPFILE -C $_UNPACK_DIR;
}
fi
else
echo $0: Cannot decompress $0 >&2;
Die 3;
fi
_RESULT=0;
}
#####################
# Script RunInstaller
#####################
RunInstaller()
{
_INSTALLER_DIR=$1;
shift;
trap 'Die $_RESULT' 0 # 0 is EXIT from shell
cd $_INSTALLER_DIR
ln -s $OLDPWD CWD # create a symbolic link to the previous working directory
#if a CPINIT script exists, source it in
if test -f CPINIT; then
{
. CPINIT
}
fi
./$_INSTALLER ${1+"$@"};
_RESULT=$?;
#if a CPFINI script exists, source it in
if test -f CPFINI; then
{
. CPFINI
}
fi
cd -;
}
###############
# Script Main
###############
_TMPDIR=/tmp/sctmpdir$$
_TARGET_DIR=$_TMPDIR
#check to see if SCEXE_TMP is defined.
if test -n "$SCEXE_TMP"; then
{
if test -d "$SCEXE_TMP"; then
{
_TMPDIR="$SCEXE_TMP"/sctmpdir$$
}
else
{
echo "$0: The path specified by the SCEXE_TMP environment variable is not valid or does not exist";
Die 3;
}
fi
}
fi
_UNPACK=0
while true
do
case $1 in
--) shift; break ;;
--interface) echo $_INTERFACE_VERSION; Die 0 ;;
--unpack) echo "$0: Required parameter missing" >&2; Die 3 ;;
--unpack=*) {
_TARGET_DIR=`echo $1 | cut -b 10- -`;
if test -z $_TARGET_DIR; then
{
echo "$0: Required parameter missing" >&2;
Die 3;
}
else
{
_UNPACK=1;
}
fi
}
break ;;
--tmp) echo "$0: Required parameter missing" >&2; Die 3 ;;
--tmp=*) {
_TMPDIR=`echo $1 | cut -b 7- -`;
shift;
if test -z $_TMPDIR; then
{
echo "$0: Required parameter missing" >&2;
Die 3;
}
fi
if test -d "$_TMPDIR"; then
{
_TMPDIR="$_TMPDIR"/sctmpdir$$
}
else
{
echo "$0: The path specified by the --tmp option is not valid or does not exist" >&2;
Die 3;
}
fi
}
break ;;
*) break ;;
esac
done
#check that all programs we need are present on the path.
_DEPS="tar gzip tail sleep rm ln mkdir mktemp echo"
which $_DEPS > /dev/null;
if test $? != 0 ; then
echo "$0: cannot find a required program." >&2;
echo "Make sure these programs are on the path: $_DEPS" >&2;
Die 3;
fi
if test $_UNPACK = 1; then
{
Unpack $_TARGET_DIR
}
else
{
Unpack $_TMPDIR;
RunInstaller $_TMPDIR $@;
Die $_RESULT;
}
fi
Die $_RESULT;
?狖闌scexe_tmp15687 作者: goldhawk 时间: 2007-12-30 17:37
没有兄弟搞过吗?帮看看啊,谢谢.作者: wang_king 时间: 2007-12-30 18:06
用online ROM作者: anti_alive 时间: 2007-12-30 19:40
回LZ:你下的这个文件是要编译的,请下载ONLINE FLASH文件,可以在WINDOWS下刷新,但在XP系统下,需要更改程序兼容性到2000才能运行,装的是WIN2000或者WIN2003可以不更改兼容性作者: goldhawk 时间: 2007-12-30 19:50