FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daos/utils/setup_daos_server_helper.sh at master · daos-stack/daos · GitHub
daos-stack
/
daos
Public
Notifications
You must be signed in to change notification settings
Fork
355
Star
981
Code
Pull requests
637
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
daos
/
utils
/
setup_daos_server_helper.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
85 lines (71 loc) · 2.07 KB
Breadcrumbs
daos
/
utils
/
setup_daos_server_helper.sh
Copy path
File metadata and controls
executable file
·
85 lines (71 loc) · 2.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
set
-ue
die
()
{
msg=
${1
:-
"
unknown error
"
}
echo
"
$msg
"
>&2
exit
1
}
check_environment
()
{
if
[
-z
"
${SL_PREFIX
:-
"
"
}
"
]
;
then
die
"
no DAOS development environment (use setup_local.sh ?)
"
fi
}
check_which
()
{
cmd=
$1
if
!
command
-v
"
$cmd
"
>
/dev/null
2>&1
;
then
die
"
$cmd
not found in
\$
PATH (yum install
$cmd
?)
"
fi
}
check_prereqs
()
{
if
[
$EUID
!=
0 ]
;
then
die
"
this script must be run as root or with sudo
"
fi
check_which patchelf
DA_SRC=
$1
if
!
[
-f
"
$DA_SRC
"
]
;
then
die
"
$DA_SRC
does not exist. did you build it?
"
fi
}
check_environment
if
[
$#
-eq
1 ]
;
then
DAOS_LOC=
$1
else
DAOS_LOC=
$SL_PREFIX
fi
DA_SRC=
$DAOS_LOC
/bin/daos_server_helper
DA_DST=/usr/bin/daos_server_helper
echo
"
This script will install daos_server_helper for developer builds (not for production).
"
echo
-n
"
Installing
$DA_SRC
->
$DA_DST
...
"
chmod -x
"
$DA_SRC
"
||
true
cp
"
$DA_SRC
"
"
$DA_DST
"
if
[
"
$SL_PREFIX
"
!=
"
$DAOS_LOC
"
]
;
then
rpath=
$(
patchelf --print-rpath
$DA_DST
|
\
sed
"
s|
$SL_PREFIX
|
$DAOS_LOC
|g
"
)
patchelf --set-rpath
"
$rpath
"
$DA_DST
fi
chmod 4755
"
$DA_DST
"
echo
"
Done.
"
#
spdk may be installed already, so skip this if SL_PREFIX is defined
if
[
-n
"
${SL_SPDK_PREFIX
:-
}
"
]
;
then
USR_SPDK=/usr/share/spdk
USR_CTL=/usr/share/daos/control
echo
-n
"
Creating SPDK script links under
$USR_SPDK
...
"
mkdir -p
"
$USR_SPDK
/scripts
"
"
$USR_CTL
"
if
!
[
-e
"
$USR_SPDK
/scripts/setup.sh
"
]
;
then
ln -sf
"
$SL_SPDK_PREFIX
/share/daos/spdk/scripts/setup.sh
"
"
$USR_SPDK
/scripts
"
fi
if
!
[
-e
"
$USR_SPDK
/scripts/common.sh
"
]
;
then
ln -sf
"
$SL_SPDK_PREFIX
/share/daos/spdk/scripts/common.sh
"
"
$USR_SPDK
/scripts
"
fi
if
!
[
-e
"
$USR_SPDK
/include
"
]
;
then
ln -s
"
$SL_SPDK_PREFIX
/include/daos_srv
"
"
$USR_SPDK
"
/include
fi
if
!
[
-e
"
$USR_CTL
/setup_spdk.sh
"
]
;
then
ln -s
"
$SL_PREFIX
/share/daos/control/setup_spdk.sh
"
"
$USR_CTL
"
fi
fi
echo
"
Done.
"
Back
|
FazBrowse Home
|
New Git URL