зеркало из https://github.com/mozilla/pjs.git
took an additional set_host function out, called the real set_host earlier
This commit is contained in:
Родитель
4326155c0b
Коммит
bf5af57e0c
|
@ -162,14 +162,18 @@ glob_init()
|
||||||
then
|
then
|
||||||
eval_opts $* # parse parameters and options - set flags
|
eval_opts $* # parse parameters and options - set flags
|
||||||
fi
|
fi
|
||||||
if [ $O_CRON = "ON" ] # if running from cron HOST needs to be
|
#if [ $O_CRON = "ON" ] # if running from cron HOST needs to be
|
||||||
then # known early, so the output file name
|
#then # known early, so the output file name
|
||||||
set_host # can be constructed. If running interactive
|
set_host # can be constructed. If running interactive
|
||||||
fi # it needs to be called by sourcing script
|
#fi # it needs to be called by sourcing script
|
||||||
. $QASCRIPT_DIR/set_environment #finds out if we are running on Windows
|
. $QASCRIPT_DIR/set_environment #finds out if we are running on Windows
|
||||||
|
Debug "OPerating system: $os_name $os_full"
|
||||||
if [ $O_WIN = "ON" ]
|
if [ $O_WIN = "ON" ]
|
||||||
then
|
then
|
||||||
|
#set_host
|
||||||
write_to_tmpfile
|
write_to_tmpfile
|
||||||
|
else
|
||||||
|
Debug "Not a Windows OS"
|
||||||
fi
|
fi
|
||||||
umask 0
|
umask 0
|
||||||
set_dirs
|
set_dirs
|
||||||
|
@ -913,43 +917,43 @@ tell()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
set_host()
|
#set_host()
|
||||||
{
|
#{
|
||||||
set_host_done=0
|
#set_host_done=0
|
||||||
HOST=`echo $HOST | sed -e "s/.red.iplanet.com//"`
|
#HOST=`echo $HOST | sed -e "s/.red.iplanet.com//"`
|
||||||
DOMSUF=`cat /etc/defaultdomain 2>/dev/null`
|
#DOMSUF=`cat /etc/defaultdomain 2>/dev/null`
|
||||||
if [ -z "$DOMSUF" ]
|
#if [ -z "$DOMSUF" ]
|
||||||
then
|
#then
|
||||||
DOMSUF="red.iplanet.com"
|
#DOMSUF="red.iplanet.com"
|
||||||
fi
|
#fi
|
||||||
if [ -z "$HOST" ]
|
#if [ -z "$HOST" ]
|
||||||
then
|
#then
|
||||||
HOST=`uname -n | sed -e "s/.red.iplanet.com//"`
|
#HOST=`uname -n | sed -e "s/.red.iplanet.com//"`
|
||||||
fi
|
#fi
|
||||||
while [ $set_host_done -eq 0 ]
|
#while [ $set_host_done -eq 0 ]
|
||||||
do
|
#do
|
||||||
Echo
|
#Echo
|
||||||
ask "DOMSUF=$DOMSUF, HOST=$HOST - OK", "y" "n" &&
|
#ask "DOMSUF=$DOMSUF, HOST=$HOST - OK", "y" "n" &&
|
||||||
set_host_done=1
|
#set_host_done=1
|
||||||
if [ $set_host_done -eq 0 ]
|
#if [ $set_host_done -eq 0 ]
|
||||||
then
|
#then
|
||||||
Echo "input DOMSUF: "
|
#Echo "input DOMSUF: "
|
||||||
read D
|
#read D
|
||||||
if [ -n "$D" ]
|
#if [ -n "$D" ]
|
||||||
then
|
#then
|
||||||
DOMSUF=$D
|
#DOMSUF=$D
|
||||||
fi
|
#fi
|
||||||
Echo "input HOST: "
|
#Echo "input HOST: "
|
||||||
read H
|
#read H
|
||||||
if [ -n "$H" ]
|
#if [ -n "$H" ]
|
||||||
then
|
#then
|
||||||
HOST=$H
|
#HOST=$H
|
||||||
fi
|
#fi
|
||||||
fi
|
#fi
|
||||||
done
|
#done
|
||||||
export HOST DOMSUF
|
#export HOST DOMSUF
|
||||||
Debug "HOST: $HOST, DOMSUF: $DOMSUF"
|
#Debug "HOST: $HOST, DOMSUF: $DOMSUF"
|
||||||
}
|
#}
|
||||||
|
|
||||||
if [ $O_INIT = "ON" ]
|
if [ $O_INIT = "ON" ]
|
||||||
then
|
then
|
||||||
|
|
Загрузка…
Ссылка в новой задаче