-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
28 lines (22 loc) · 857 Bytes
/
bootstrap.sh
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
#!/bin/sh
export CWS_TOP=/opt/ibm/spectrumcomputing
export CLUSTERADMIN=egoadmin
export HOSTNAME=`hostname`
# patch to support kernel 4
sed -i 's|$version = "3"|$version = "3" -o $version = "4"|g' ${CWS_TOP}/kernel/conf/profile.ego
/bin/su -c "source $CWS_TOP/kernel/conf/profile.ego; egoconfig join $MASTERNAME -f" egoadmin
if [ "$MASTERNAME" == `hostname` ]; then
cat /var/tmp/cfc/key1.dat >> /tmp/license.dat
sed -i -e '$a\' /tmp/license.dat
cat /var/tmp/cfc/key2.dat >> /tmp/license.dat
/bin/su -c "source $CWS_TOP/profile.platform; egoconfig mghost /shared -f; source $CWS_TOP/profile.platform; egoconfig setentitlement /tmp/license.dat" egoadmin
fi
source $CWS_TOP/profile.platform
chown $CLUSTERADMIN $CWS_TOP/kernel/work
chgrp $CLUSTERADMIN $CWS_TOP/kernel/work
egosh ego start
i=1
while [ "$i" -ne 0 ]
do
sleep 10
done