-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinkpara
executable file
·39 lines (30 loc) · 1.29 KB
/
linkpara
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/bash
#rm -f /lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8
#ln -sf /lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8_cactus /lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8
conus_ver=v0.5.2
na_ver=v0.9.1
exp_ver=v0.9.1
mysite=$(cat /etc/cluster_name)
primary=$(head -1 /lfs/h1/ops/prod/config/prodmachinefile | cut -d ":" -f2-)
backup=$(head -2 /lfs/h1/ops/prod/config/prodmachinefile | tail -1 | cut -d ":" -f2-)
if [ "$primary" == "$mysite" ]; then
machine=prod
echo "this prod machine"
else
machine=dev
echo "this develop machine"
fi
#link to t2o dir
#since na prod is in h2 disk, link prod to f2/t2o disk first
rm -f /lfs/h2/emc/ptmp/emc.lam/rrfs/na
rm -f /lfs/f2/t2o/ptmp/emc/ptmp/emc.lam/rrfs/na
if [ "$machine" == "prod" ]; then
# ln -sf /lfs/f2/t2o/ptmp/emc/ptmp/emc.lam/rrfs/${na_ver} /lfs/h2/emc/ptmp/emc.lam/rrfs/na
ln -sf /lfs/h2/emc/ptmp/emc.lam/rrfs/${na_ver} /lfs/h2/emc/ptmp/emc.lam/rrfs/na
ln -sf /lfs/f2/t2o/ptmp/emc/ptmp/emc.lam/rrfs/${na_ver} /lfs/f2/t2o/ptmp/emc/ptmp/emc.lam/rrfs/na
else
ln -sf /lfs/h2/emc/ptmp/emc.lam/rrfs/${na_ver} /lfs/h2/emc/ptmp/emc.lam/rrfs/na
ln -sf /lfs/h2/emc/ptmp/emc.lam/rrfs/${exp_ver} /lfs/h2/emc/ptmp/emc.lam/rrfs/exp
fi
ln -sf /lfs/h2/emc/lam/noscrub/emc.lam/obsproc.DATA/CRON/rrfs_e/com/obsproc/v1.0/* /lfs/h2/emc/lam/noscrub/emc.lam/obsproc.DATA/CRON/rrfs/com/obsproc/v1.0
exit