-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathhpci.sh
39 lines (34 loc) · 1019 Bytes
/
hpci.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
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -xeu
status=1
trap '[ $status = 1 ] && echo NG; rm -f get_gfarm2conf.sh; exit $status' \
0 1 2 15
GSICONF=/etc/grid-security/gsi.conf
grep "NAME_COMPATIBILITY=HYBRID" $GSICONF || {
sudo mv $GSICONF $GSICONF.orig
awk '/^NAME_COMPATIBILITY=/{print "NAME_COMPATIBILITY=HYBRID";next}
{print}' $GSICONF.orig | sudo tee $GSICONF > /dev/null
}
sudo mkdir -p /etc/grid-security/certificates
OPWD=$PWD
cd /etc/grid-security/certificates
HASH=61cd35bd
for suf in signing_policy 0
do
[ -f $HASH.$suf ] || {
[ -f $OPWD/hpci/$HASH.$suf ] &&
sudo cp $OPWD/hpci/$HASH.$suf . ||
sudo wget https://www.hpci.nii.ac.jp/ca/$HASH.$suf
}
done
cd $OPWD
[ -f get_gfarm2conf.sh ] ||
wget https://www.hpci-office.jp/info/download/attachments/69471402/\
get_gfarm2conf.sh
[ -f ~/.gfarm2rc.hpci ] ||
sh ./get_gfarm2conf.sh -f ~/.gfarm2rc.hpci
echo mv ~/.globus ~/.globus.bak
echo myproxy-logon -s portal.hpci.nii.ac.jp -t 168 -l HPCI-ID
echo export GFARM_CONFIG_FILE=$HOME/.gfarm2rc.hpci
status=0
echo Done