forked from open-power/HTX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htxrc
130 lines (111 loc) · 4.19 KB
/
.htxrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# IBM_PROLOG_BEGIN_TAG
#
# Copyright 2003,2016 IBM International Business Machines Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# IBM_PROLOG_END_TAG
export HTXLPP=/usr/lpp/htx/
export HTXPATH=/usr/lpp/htx
export HTXLINUXLEVEL=${HTXLPP}htxlinuxlevel
export HTXPATTERNS=${HTXLPP}pattern/
export HTXRULES=${HTXLPP}rules/
export HTXREGRULES=${HTXRULES}/reg/
export HTXEMCRULES=${HTXRULES}/emc/
export HTXECG=${HTXLPP}ecg/
export HTXMDT=${HTXLPP}mdt/
export HTXOBJREPOS=${HTXLPP}etc/objrepos/
export HTXFORMATS=${HTXLPP}etc/
export HTXKERNEXT=${HTXLPP}bin/
export HTXSCREENS=${HTXLPP}etc/screens/
export STXSCREENS=${HTXLPP}etc/screens_stx/
export HTXMISC=${HTXLPP}etc/misc/
export HTXMICROCODE=${HTXLPP}etc/microcode/
export HTXTMP=/tmp/
export HTXSETUP=${HTXLPP}setup/
export HTXRUNSETUP=${HTXLPP}runsetup/
export HTXRUNCLEANUP=${HTXLPP}runcleanup/
export HTXCLEANUP=${HTXLPP}cleanup/
export HTXPROCESSORS=1
export HTXOWNERS=${HTXLPP}exerowners/
export HTXINFO=${HTXLPP}exerinfo/
export HTXFORMATS=${HTXLPP}etc/formats/
export HTXSCRIPTS=${HTXLPP}etc/scripts/
export HTXKERNEXT=${HTXLPP}etc/kernext/
if [[ "$HTXD_STARTUP_MODE" = "ON" ]] ; then
HTXD_STARTUP_MODE=OFF
return
fi
if [ -f ${HTXLPP}.autostart ] && [ -f /tmp/mpath_parts ] ; then
if [ `cat /tmp/mpath_parts | wc -l` != 0 ] ; then
echo "sleeping 120 seconds for bootme with multipath"
sleep 120
fi
fi
# To execute post boot commands for bootme
if [ -f ${HTXLPP}.autostart ] ; then
BOOT_POST=$(grep "^BOOT_POST:" ${HTXREGRULES}bootme/default | head -n1 | awk '{ print $2 }')
[ -f ${BOOT_POST} ] && . ${BOOT_POST}
fi
if [ -f /usr/lpp/htx/etc/scripts/map.sh ]; then
echo " Creating pmap.txt ...." | tee -a $HTXNoise
/usr/lpp/htx/etc/scripts/map.sh 2 > /dev/null | tee -a $HTXNoise
fi
# Run htx.setup script which loads miscex kernel extension. Miscex kernel
# extension is required to be loaded before any setup is done.
if [ -f ${HTXPATH}/setup/htx.setup ]; then
${HTXPATH}/setup/htx.setup 2>/dev/null | tee -a $HTXNoise
fi
echo "Collecting LPAR configuration details ..." | tee -a $HTXNoise
/usr/lpp/htx/bin/show_syscfg >/tmp/htx_syscfg 2>/dev/null
for file in `/bin/ls $HTXSETUP[a-zA-Z]*.setup 2>/dev/null| sort | grep -v mem.setup | grep -v "htx\.setup"`
do
. $file | tee -a $HTXNoise
done
# Now run mem.setup
. /usr/lpp/htx/setup/mem.setup | tee -a $HTXNoise
# create new ecg.bu if configuration has changed from last time
# (htxcfg file is created by the htxconfig script)
# configure ttys and other devices, create ecg.bu
cd ${HTXLPP}etc/scripts
#if [ ! -f ${HTXLPP}.autostart ]; then
./devconfig | tee -a $HTXNoise
#else
# ./part.pl > /dev/null
#fi
cd ${HTXLPP}
#[ ! -f $HTXLPP/ecg/ecg ] && cp $HTXLPP/ecg/ecg.bu $HTXLPP/ecg/ecg
[ ! -f $HTXLPP/mdt/mdt ] && cp $HTXLPP/mdt/mdt.all $HTXLPP/mdt/mdt
cat /tmp/devlist_warning 2>/dev/null
# Work-around for autostartup problems
[ -f ${HTXLPP}.autostart ] && sleep 20
[ -f ${HTXLPP}.autostart ] && ${HTXSCRIPTS}runsup
alias logout=". ${HTXSCRIPTS}htxlogout"
alias exit=". ${HTXSCRIPTS}htxlogout"
set -o ignoreeof
alias htx=". runsup"
alias stx="/usr/lpp/htx/etc/scripts_stx/runstx"
alias stopstx="/usr/lpp/htx/etc/scripts_stx/stopstx"
# Export ZLIB variables to start testing corsa hardware.
export ZLIB_DEFLATE_IMPL=1; export ZLIB_INFLATE_IMPL=1; export ZLIB_CARD=0; export ZLIB_INFLATE_THRESHOLD=0;
# Reset virtual mem ulimit, to unlimited.
ulimit -v unlimited
# Increase open files limit.
num_proc=`cat /proc/cpuinfo | grep -i processor | wc -l`
open_files_limit=`expr $num_proc \* 4`
if [[ $num_proc -lt 1024 ]]
then
open_files_limit=1024
fi
ulimit -n $open_files_limit