@@ -28,14 +28,14 @@ if [ ! -f "$_PBENCH_SERVER_CONFIG" ] ;then
28
28
exit 2
29
29
fi
30
30
31
- bindir=$( pbench-config script-dir pbench-server)
31
+ bindir=$( pbench-server- config script-dir pbench-server)
32
32
if [ -z " $bindir " ] ; then
33
33
echo " No 'script-dir' setting in [pbench-server] section of config file $_PBENCH_SERVER_CONFIG "
34
34
exit 3
35
35
fi
36
36
37
37
# what roles does this server play?
38
- roles=$( pbench-config -l roles pbench-server)
38
+ roles=$( pbench-server- config -l roles pbench-server)
39
39
if [ -z " $roles " ] ; then
40
40
echo " No 'roles' setting in [pbench-server] section of config file $_PBENCH_SERVER_CONFIG "
41
41
exit 3
@@ -51,21 +51,21 @@ hostname=$(hostname -f)
51
51
# the sanity check below will just skip all the roles for
52
52
# the host, leaving us with an empty crontab. If you do
53
53
# get an empty crontab, this is a good thing to check.
54
- realhost=$( pbench-config realhost pbench-server)
54
+ realhost=$( pbench-server- config realhost pbench-server)
55
55
56
56
function crontab_header() {
57
57
local mailfrom mailto
58
58
59
59
echo " _PBENCH_SERVER_CONFIG=$_PBENCH_SERVER_CONFIG " >> $crontab
60
- echo " PYTHONPATH=$( pbench-config lib-dir pbench-server) " >> $crontab
60
+ echo " PYTHONPATH=$( pbench-server- config lib-dir pbench-server) " >> $crontab
61
61
62
- mailto=$( pbench-config mailto pbench-server)
62
+ mailto=$( pbench-server- config mailto pbench-server)
63
63
if [ -z " $mailto " ] ; then
64
64
echo " No 'mailto' specified in [pbench-server] section of the config file $_PBENCH_SERVER_CONFIG "
65
65
else
66
66
echo " MAILTO=$mailto " >> $crontab
67
67
fi
68
- mailfrom=$( pbench-config mailfrom pbench-server)
68
+ mailfrom=$( pbench-server- config mailfrom pbench-server)
69
69
if [ -z " $mailfrom " ] ; then
70
70
echo " No 'mailfrom' specified in [pbench-server] section of the config file $_PBENCH_SERVER_CONFIG "
71
71
else
@@ -76,12 +76,12 @@ function crontab_header() {
76
76
function crontab_normal() {
77
77
local role=$1
78
78
79
- tasks=$( pbench-config -l tasks $role )
79
+ tasks=$( pbench-server- config -l tasks $role )
80
80
if [ -z " $tasks " ] ; then
81
81
echo " No 'tasks' specified in [$role ] section of the config file $_PBENCH_SERVER_CONFIG "
82
82
else
83
83
for task in $tasks ; do
84
- crontabline=$( pbench-config crontab $task )
84
+ crontabline=$( pbench-server- config crontab $task )
85
85
if [ -z " $tasks " ] ; then
86
86
echo " No 'crontab' specified in [$task ] section of the config file $_PBENCH_SERVER_CONFIG "
87
87
else
@@ -99,12 +99,12 @@ function crontab_with_substitutions() {
99
99
local section=$1
100
100
local task=$2
101
101
102
- crontabline=$( pbench-config crontab $task )
102
+ crontabline=$( pbench-server- config crontab $task )
103
103
if [ -z " $crontabline " ] ; then
104
104
echo " No 'crontab' specified in [$task ] section of the config file $_PBENCH_SERVER_CONFIG "
105
105
else
106
106
echo " $crontabline " |
107
- sed " $( pbench-config -a $section | grep = | awk -F' = ' ' {gsub(/-/, "_", $1); printf "s;$%s;%s;g\n", toupper($1) , $2;}' ) " >> $crontab
107
+ sed " $( pbench-server- config -a $section | grep = | awk -F' = ' ' {gsub(/-/, "_", $1); printf "s;$%s;%s;g\n", toupper($1) , $2;}' ) " >> $crontab
108
108
fi
109
109
}
110
110
@@ -113,7 +113,7 @@ crontab_header
113
113
114
114
for role in $roles ; do
115
115
116
- host=$( pbench-config host $role )
116
+ host=$( pbench-server- config host $role )
117
117
# Sanity test: either host or realhost (from the config file)
118
118
# *must* match the hostname of the host where this is being
119
119
# installed, otherwise this role is irrelevant for this host
@@ -123,8 +123,8 @@ for role in $roles ;do
123
123
fi
124
124
case $role in
125
125
pbench-prep)
126
- versions=$( pbench-config -l pbench-move-results-receive-versions pbench-server)
127
- tasks=$( pbench-config -l tasks $role )
126
+ versions=$( pbench-server- config -l pbench-move-results-receive-versions pbench-server)
127
+ tasks=$( pbench-server- config -l tasks $role )
128
128
for version in $versions ; do
129
129
for task in $tasks ; do
130
130
crontab_with_substitutions prep-shim-$version $task
@@ -140,17 +140,17 @@ done
140
140
chmod 644 $crontab
141
141
142
142
# create the lock directory that the cron entries will use
143
- lockdir=$( pbench-config lock-dir pbench-server)
143
+ lockdir=$( pbench-server- config lock-dir pbench-server)
144
144
mkdir -p ${lockdir}
145
145
chmod 755 ${lockdir}
146
146
147
- user=$( pbench-config user pbench-server)
147
+ user=$( pbench-server- config user pbench-server)
148
148
if [ -z " $user " ] ; then
149
149
echo " user is undefined in section \" pbench-server\" of config file."
150
150
exit 5
151
151
fi
152
152
153
- group=$( pbench-config group pbench-server)
153
+ group=$( pbench-server- config group pbench-server)
154
154
if [ -z " $group " ] ; then
155
155
echo " group is undefined in section \" pbench-server\" of config file."
156
156
exit 5
0 commit comments