免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5258 | 回复: 14
打印 上一主题 下一主题

setup-standard传到主机执行时,提示奇怪问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-10 10:37 |只看该作者 |倒序浏览
5可用积分
提示执行被取消,因为必须从/sun/install 下执行 .....


因为在安装推荐EIS推荐补丁集前必须执行setup-standard,所以............

论坛徽章:
0
2 [报告]
发表于 2007-12-10 11:23 |只看该作者
你是咋传的?整个目录打个包传上去,或者nfs share过去吧。

论坛徽章:
0
3 [报告]
发表于 2007-12-10 11:33 |只看该作者
光传个别文件是不行的。还是把iso传上去吧,也用不了多长时间的

论坛徽章:
0
4 [报告]
发表于 2007-12-10 19:09 |只看该作者
晕.........

论坛徽章:
0
5 [报告]
发表于 2007-12-11 23:09 |只看该作者
...............

论坛徽章:
0
6 [报告]
发表于 2007-12-11 23:58 |只看该作者
你需要了解setup_install_standard.sh中的文件访问哪些directories & files;我做成过,不过没有记录。看看脚本就明白了。不复杂。

论坛徽章:
0
7 [报告]
发表于 2007-12-12 08:59 |只看该作者
用nfs share过去可以装,偶有时候弄没有dvdrom的机器,就是用自己笔记本开个nfs server把笔记本的光驱挂过去

论坛徽章:
0
8 [报告]
发表于 2007-12-14 09:55 |只看该作者
#!/bin/sh
#
# Script to set up numerous "EIS Standard actions" on SUN servers.
#
# Latest modification: 27-OCT-07
#     17-May-07 BDP amendments to all pre first boot patching (ALTROOT)
#

SFSLIST="
        SUNWsan
        SUNWcfpl
        SUNWcfplx
        SUNWfchba
        SUNWcfclr
        SUNWfchbr
        SUNWfchbx
        SUNWfcsm
        SUNWfcsmx
        SUNWcfcl
        SUNWcfclx
        SUNWmdiu"

BASE=""


if [ ! -f ../.release ]
then
    echo ""
    echo "You are not running this script from .../sun/install - aborting!"
    echo ""
    exit 1
fi

if [ ! -f profile-root ]
then
    echo ""
    echo "Please change directory to .../sun/install & try again"
    echo ""
    exit 1
fi

Usage()
{
    echo "usage: setup-standard.sh [-q] [-nosfk]"
    echo " [-act]      - Skip over installation of ACT."
    echo " [-exp]      - Skip over installation of explorer."
    echo " [-sneep]    - Skip over installation of sneep."
    echo " [-init]     - Exit after initialisation (change no settings)."
    echo " [-keeppm]   - Do not change anything around power management."
    echo " [-q]        - Quiet option - asks no questions & skips ACT & explorer."
    echo "               Always installs SAN Foundation Suite unless -nosfk used."
    echo " [-nosfk]    - Do NOT install of SAN Foundation Suite."
}


#
# Sub-Script to ask if option required or not
# Return 0 = no; 1 = yes; 2 = ENABLE; 3 = CHANGE
#
yesno()
{
#echo "QUIET is $QUIET"
    if [ $QUIET = "NO" ]
    then
        while .
        do
                echo ""
            echo $1
                read reply
                case $reply
                in
                    C) return 3;;
                    E) return 2;;
                    y) return 1;;
                    n) return 0;;
                    *) echo "Invalid response, please try again" ;;
                esac
        done
        echo "ANSWER = $answer"
    else
        return 1
    fi
}


#
# Sub-Script to display banner if JASS package is installed.
#
isjassinstalled()
{
    $PKGINFO -q SUNWjass
    if [ $? = 0 ]
    then
        echo ""
        echo "   *************************************************************"
        echo "   * Package SUNWjass is installed.  Be prepared to audit your *"
        echo "   *  JASS settings after patching and possibly re-apply JASS. *"
        echo "   *                                                           *"
        echo "   *   Refer to the SST 4.2 Administration Guide, Chapter 2,   *"
        echo "   *        pp. 32-33,  \"Maintaining System Security\"          *"
        echo "   *************************************************************"
        echo ""
    fi
}


#
# If possible, get serial number from explorer, otherwise get from eeprom or elsewhere.
# Use sneep to put that serial into eeprom, explorer, etc.
#
sneep_explorer_serial()
{
        HAVE_SNEEP=${HAVE_SNEEP:-false}        # default HAVE_SNEEP if not set already

        ${HAVE_SNEEP} || return 1

        expserial=`${SNEEP} -P explorer `
        if test "${expserial}" != unknown ; then
                # trust the updated explorer defaults file, update eeprom
                ${SNEEP} -s "${expserial}"        # update serial from explorer
        else
                # if we have some other serial data, update the explorer serial
                otherserial=`${SNEEP}`
                if test "${otherserial}" != unknown ; then
                        # update explorer serial from wherever we can get it
                        ${SNEEP} -s "${otherserial}"
                fi
        fi
        return 0
}


#
# Initialisation
#

TEMP=/tmp/EIS-$$
INIT="NO"
QUIET="NO"
KEEPPM=${KEEPM:-"NO"}
ACT="YES"
STAG="YES"
EXP="YES"
NC3="YES"
ADDSFK="YES"
ADDSNEEP="YES"
PKGRM="pkgrm"
PKGADD="pkgadd"
PKGINFO="pkginfo"
ALTROOT=""
ZONE="NO"


#
# Analyse parameters
#

#echo "all ARGS=$*"

while [ X$1 != "X" ]
do
        case $1 in
        -act)                ACT='NO';;
        -exp)                EXP='NO';;
        -nc)                NC3='NO';;
        -sneep | -sne)        ADDSNEEP='NO' ;;
        -init)                INIT='YES';;
        -keeppm)        KEEPPM='YES';;
        -nosfk)                ADDSFK='NO';;
        -nosfs)                ADDSFK='NO';;
        -q)                QUIET='YES'; ACT='NO'; EXP='NO'
                        echo "Quiet mode selected";;
        -R)             BASE=$2
                        if [ "X${BASE}" = "X" ]
                        then
                           echo ""
                           echo "Option -R requires parameter: Client_Root_Path"
                           echo ""
                           Usage;  exit 2
                        fi
                        if [ ! -d ${BASE} ]
                        then
                           echo ""
                           echo "Client_Root_Path \"${BASE}\" does not exist!"
                           echo ""
                           Usage;  exit 2
                        fi
                        PKGRM="pkgrm -R ${BASE}"
                        PKGADD="pkgadd -R ${BASE}"
                        PKGINFO="pkginfo -R ${BASE}"
                        ALTROOT="-R ${BASE}"
                        shift;;
        -*)             Usage; exit 2;;
        *) ;;
        esac
        shift
done

#
# Prepare file for silent package removal
#

sed 's/action=ask/action=nocheck/' ${BASE}/var/sadm/install/admin/default > /tmp/noask

echo ""
echo "Running setup-standard with EIS-DVD Vn `head -1 ../.release`"
echo "================================================"
echo ""
isjassinstalled

#
# Special Actions if on Intel Platform
#
LOCALBIN="local-bin"
CTEACT="CTEact"
if [ `uname -p` = i386 ]
then
    LOCALBIN="local-bin_x86"
    CTEACT="CTEactx"
    ADDSFK='NO'
    NC3='NO'
    echo ""
fi

if $LOCALBIN/aged ../.release 50
then
    echo ""
    echo "******************************************************"
    echo "*   You are using a EIS-DVD that is > 50 days old!   *"
    echo "* Please ensure that you use the most recent version *"
    echo "******************************************************"
    echo ""
fi


#
# Special Actions if in non-local zone
#
if [ -f /usr/bin/zonename ]
then
    if [ `zonename` != "global" ]
    then
        ZONE="non-global"
        echo ""
        echo "Non-Global zone detected."
        echo ""
    fi
fi


#
# Determine if this is a starcat System Controller - from D.C.
#

is_15k_sc="true"
dev_count=`prtconf -p | grep -c \'gchip\'`
if [ "${dev_count}" -eq 0 ] ; then
    is_15k_sc="false"
fi
dev_count=`prtconf -p | grep -c \'echip\'`
if [ "${dev_count}" -eq 0 ] ; then
    is_15k_sc="false"
fi
dev_count=`prtconf -p | grep -c \'consbus\'`
if [ "${dev_count}" -eq 0 ] ; then
    is_15k_sc="false"
fi


#
# Determine root's HOME directory
#

if [ ! -f ${BASE}/etc/passwd ]
then
    echo ""
    echo "Cannot find ${BASE}/etc/passwd - bailing out!"
    exit 1
fi

ROOTHOME=${BASE}/`grep "^root:" /${BASE}/etc/passwd | awk -F: '{print $6}'`

if [ ! -d $ROOTHOME ]
then
    echo ""
    echo "Cannot find root's HOME directory ($ROOTHOME) - bailing out!"
    exit 1
fi

if [ "$ROOTHOME" = "/" ]
then
    ROOTHOME=""
fi


#
# Create /var/sun and save initial information
# Dont do prtvotc if disk already under SDS.
#

if [ ! -d ${BASE}/var/sun/install-ORIG ]
then
    echo "Creating ${BASE}/var/sun for scripts, log files etc..."
    mkdir -p ${BASE}/var/sun/install-ORIG
    if [ $ZONE != "non-global" ]
    then
        cp -p ${BASE}/etc/system ${BASE}/etc/system-INSTALL
        cp -p ${BASE}/etc/system ${BASE}/var/sun/install-ORIG
        cp -p ${BASE}/etc/path_to_inst ${BASE}/etc/path_to_inst-INSTALL
        cp -p ${BASE}/etc/path_to_inst ${BASE}/var/sun/install-ORIG
    fi
    cp -p ${BASE}/etc/vfstab ${BASE}/etc/vfstab-INSTALL
    cp -p ${BASE}/etc/vfstab ${BASE}/var/sun/install-ORIG
    DISK=`df -k | head -2 | tail -1 | awk '{ print $1 }'`
    echo $DISK | grep md > /dev/null 2>&1
    if [ $? = 1  -a  $ZONE != "non-global" ]
    then
        prtvtoc $DISK > ${BASE}/var/sun/install-ORIG/prtvtoc-systemdisk-INSTALL
    fi
    /usr/bin/showrev -p > ${BASE}/var/sun/install-ORIG/showrev-p.out
fi

#
# Create log file & make initial entry.
#

if [ -f ${BASE}/var/sun/GOLD-CD.log ]
then
    if [ -f ${BASE}/var/sun/EIS-CD.log ]
    then
        echo ""
        echo "INFO: In ${BASE}/var/sun both GOLD-CD.log and EIS-CD.log exist!!!!"
        echo "      Please merge into EIS-CD.log & remove GOLD-CD.log"
        echo ""
    else
        echo ""
        echo "INFO: Renaming ${BASE}/var/sun/GOLD-CD.log to EIS-CD.log"
        echo ""
        mv ${BASE}/var/sun/GOLD-CD.log ${BASE}/var/sun/EIS-CD.log
    fi
fi
echo "`date`: Ran setup-standard with EIS-DVD Vn `head -1 ../.release`" >>${BASE}/var/sun/EIS-CD.log
rm -f ${BASE}/var/sun/.release-GOLD-CD
cp -p ../.release ${BASE}/var/sun/.release-EIS-CD


#
# Copy scripts etc across to /opt/sun/bin
#
if [ ! -d ${BASE}/opt/sun ]
then
    mkdir -p ${BASE}/opt/sun
fi

echo "Loading /opt/sun/bin..."
tar cf - bin | (cd ${BASE}/opt/sun; tar xBpf -)

for file in gzcat gunzip unzip
do
    if [ ! -f ${BASE}/usr/bin/${file} -a ! -f ${BASE}/opt/sun/bin/${file} ]
    then
        echo "${BASE}/usr/bin/${file} not found - copying ${file} from EIS-DVD into ${BASE}/opt/sun/bin"
        cp -p $LOCALBIN/${file} ${BASE}/opt/sun/bin
    fi
done


# Just in case someone uses SCCS on this file, protect the date format string
# from %-keyword expansion by converting @ to % at runtime
datefmt=`echo +@Y@m@d | tr @ % `
#
# Set up PROFILEs for user ROOT
#
NEWPROFILE="NO"
NEWEISPROFILE="NO"

if [ ! -f ${ROOTHOME}/.profile ]
then
    echo "Setting up ${ROOTHOME}/.profile..."
    cp -p  profile-root ${ROOTHOME}/.profile
    cp -p  profile-EIS ${ROOTHOME}/.profile-EIS
    echo "`date`: Installed new .profile & .profile-EIS" >>${BASE}/var/sun/EIS-CD.log
    NEWPROFILE="YES"
    NEWEISPROFILE="YES"
else
    if [ ! -f ${ROOTHOME}/.profile-EIS ]
    then
        echo "Setting up ${ROOTHOME}/.profile-EIS..."
        cp -p profile-EIS ${ROOTHOME}/.profile-EIS
        echo "`date`: Installed new .profile-EIS" >>${BASE}/var/sun/EIS-CD.log
        NEWEISPROFILE="YES"
    else
        diff profile-EIS ${ROOTHOME}/.profile-EIS > /dev/null 2>&1
        if [ $? != 0 ]
        then
            cp -p ${ROOTHOME}/.profile-EIS ${BASE}/var/sun/.profile-EIS-`date \
                                                                ${datefmt}`
            echo "Setting up new ${ROOTHOME}/.profile-EIS..."
            cp -p profile-EIS ${ROOTHOME}/.profile-EIS
            echo "`date`: Updated .profile-EIS" >>${BASE}/var/sun/EIS-CD.log
            NEWEISPROFILE="YES"
        fi
    fi
fi

#
# Search ROOT's PROFILE for sourcing of EIS profile
#
SOURCED="YES"

grep '^    . $HOME/.profile-EIS' ${ROOTHOME}/.profile > /dev/null 2>&1
if [ $? = 1 ]
then
    echo ""
    echo "BEWARE: ${ROOTHOME}/.profile does NOT source ${ROOTHOME}/.profile-EIS"
    echo "PLEASE: examine why this is not sourced!"
    SOURCED="NO"
    echo ""
    sleep 4
fi

#
# Bail out if init flag was set
#
if [ $INIT = "YES" ]
then
    echo ""
    echo "INIT-mode: terminating after initialisation."
    echo "`date`: Exited setup-standard after initialisation" >>${BASE}/var/sun/EIS-CD.log
    exit 0
fi

#
# Power Saving Daemon - correct possible old format
#

if [ -f ${BASE}/etc/rc2.d/noS85power ]
then
    mv ${BASE}/etc/rc2.d/noS85power ${BASE}/etc/rc2.d/S85power
    grep "^autoshutdown.*noshutdown" ${BASE}/etc/power.conf >/dev/null
    if [ $? = 1 ]
    then
        echo ""
        echo "Changing power saving daemon disabling to correct method!..."
        cp -p ${BASE}/etc/power.conf ${BASE}/etc/power.conf.fcs
        rm -f ${BASE}/etc/power.conf

        # We change the FIFTH parameter in the line beginning on
        # "autoshutdown" from whatever to "noshutdown";

        cat ${BASE}/etc/power.conf.fcs \
            | nawk '{
                if ( $1 == "autoshutdown" ) {
                # all this effort is to keep the line format (all tabs etc.)...
                line=$0 ;
                fifth=$5 ;
                rest=substr(line,13,length(line)-12) ; # everything except "autoshutdown"
                i=index(rest,fifth);                   # fifth word starts here
                printf("%s%s%s\n",$1,substr(rest,1,i-1),"noshutdown") ;
                  }
                else { print $0 }
                  }' > ${BASE}/etc/power.conf
        
        chown root:root ${BASE}/etc/power.conf
        chmod 664 ${BASE}/etc/power.conf
        /usr/bin/diff ${BASE}/etc/power.conf ${BASE}/etc/power.conf.fcs  >  /dev/null
        if [ $? = 1 ]
        then
            echo "${BASE}/etc/power.conf has been modified."
        else
            echo "UNABLE TO CHANGE ${BASE}/etc/power.conf !"
        fi
    fi
fi


#
# Power Saving Daemon - Disable first time
#

if [ $KEEPPM = "YES" ]
then
    echo "KEEPPM-mode: Power Management settings will not be touched."
    echo ""
else
    if [ -f ${BASE}/etc/power.conf ]
    then
        grep "noshutdown" ${BASE}/etc/power.conf >/dev/null
        if [ $? = 1 ]
        then
            yesno "Is the power saving daemon to be disabled? [y/n]: \c"
            if [ $? = 1 ]
            then
                cp -p ${BASE}/etc/power.conf ${BASE}/etc/power.conf.fcs
                rm -f ${BASE}/etc/power.conf

                cat ${BASE}/etc/power.conf.fcs \
                | nawk '{
                    if ( $1 == "autoshutdown" ) {
                      # all this effort is to keep the line format (all tabs etc.)...
                      line=$0 ;
                      fifth=$5;
                      rest=substr(line,13,length(line)-12) ;
                      i=index(rest,fifth);
                      printf("%s%s%s\n",$1,substr(rest,1,i-1),"noshutdown") ;
                    }
                    else { print $0 }
                  }'  > ${BASE}/etc/power.conf

                chown root:root ${BASE}/etc/power.conf
                chmod 664 ${BASE}/etc/power.conf
                /usr/bin/diff ${BASE}/etc/power.conf ${BASE}/etc/power.conf.fcs  >  /dev/null
                if [ $? = 1 ]
                then
                    echo "${BASE}/etc/power.conf has been modified."
                    echo "`date`: Disabled power saving daemon" >>${BASE}/var/sun/EIS-CD.log
                else
                    echo 'UNABLE TO CHANGE ${BASE}/etc/power.conf !'
                    echo "`date`: UNABLE TO disable  power saving daemon" >>${BASE}/var/sun/EIS-CD.log
                fi
            fi
        else
            echo ""
            echo "The power daemon start-up has probably already been disabled...."
        fi
    else
        echo ""
        echo "File ${BASE}/etc/power.conf is not present...."
        echo "Probably power management is not installed - no problem!"
    fi
....................

论坛徽章:
0
9 [报告]
发表于 2007-12-14 10:01 |只看该作者
Please change directory to .../sun/install & try again...

我是把/sun/patch/8 下的所有patch unpack后全部rcp 到目的主机/var/tmp下,即/var/tmp/8 内.然后这个SH脚本也传到/var/tmp下,执行提示You are not running this script from .../sun/install - aborting,请问把这脚本放在目的主机哪个目录下才能运行呀....

论坛徽章:
0
10 [报告]
发表于 2007-12-14 10:18 |只看该作者
原帖由 wangnn 于 2007-12-14 10:01 发表
Please change directory to .../sun/install & try again...

我是把/sun/patch/8 下的所有patch unpack后全部rcp 到目的主机/var/tmp下,即/var/tmp/8 内.然后这个SH脚本也传到/var/tmp下,执行提示You are n ...


这样搞EIS,暴殓天物
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP