@@ -151,15 +151,15 @@ on_failure() {
151
151
# ## process control
152
152
# #####################################################################################
153
153
154
- kill_process_if_running () {
154
+ term_process () {
155
155
156
156
local -r base=$( basename " $1 " )
157
157
local -r pid=$( pidof " $base " )
158
158
159
159
if [[ -n $pid ]]; then
160
- log " killing $base "
161
- kill -TERM " $pid "
162
- on_failure warn " unable to kill $base "
160
+ log " terminating $base "
161
+ kill " $pid "
162
+ on_failure warn " unable to terminate $base "
163
163
else
164
164
log " $base was not running"
165
165
fi
@@ -180,10 +180,10 @@ stop_mount() {
180
180
local args=()
181
181
if is_logging_debug; then
182
182
args+=(' -v' )
183
+ log " un-mounting $type filesystem from $path "
183
184
fi
184
185
args+=(" $path " )
185
186
186
- log " un-mounting $type filesystem from $path "
187
187
umount " ${args[@]} "
188
188
on_failure warn " unable to un-mount $type filesystem from $path "
189
189
@@ -194,9 +194,9 @@ stop_mount() {
194
194
195
195
stop_nfsd () {
196
196
197
- log ' stopping nfsd'
197
+ log ' terminating nfsd'
198
198
$PATH_BIN_NFSD 0
199
- on_failure warn ' unable to stop nfsd. if it had started already, check Docker host for lingering [nfsd] processes'
199
+ on_failure warn ' unable to terminate nfsd. if it had started already, check Docker host for lingering [nfsd] processes'
200
200
}
201
201
202
202
stop_exportfs () {
@@ -216,22 +216,22 @@ stop() {
216
216
log_header ' terminating ...'
217
217
218
218
if is_kerberos_requested; then
219
- kill_process_if_running " $PATH_BIN_RPC_SVCGSSD "
219
+ term_process " $PATH_BIN_RPC_SVCGSSD "
220
220
fi
221
221
222
222
stop_nfsd
223
223
224
224
if is_idmapd_requested; then
225
- kill_process_if_running " $PATH_BIN_IDMAPD "
225
+ term_process " $PATH_BIN_IDMAPD "
226
226
fi
227
227
228
228
if is_nfs3_enabled; then
229
- kill_process_if_running " $PATH_BIN_STATD "
229
+ term_process " $PATH_BIN_STATD "
230
230
fi
231
231
232
- kill_process_if_running " $PATH_BIN_MOUNTD "
232
+ term_process " $PATH_BIN_MOUNTD "
233
233
stop_exportfs
234
- kill_process_if_running " $PATH_BIN_RPCBIND "
234
+ term_process " $PATH_BIN_RPCBIND "
235
235
stop_mount " $MOUNT_PATH_NFSD "
236
236
stop_mount " $MOUNT_PATH_RPC_PIPEFS "
237
237
@@ -701,7 +701,7 @@ boot_main_nfsd() {
701
701
boot_helper_start_daemon " starting rpc.nfsd on port $port with $threads server thread(s)" $PATH_BIN_NFSD " ${args[@]} "
702
702
703
703
if ! is_nfs3_enabled; then
704
- kill_process_if_running " $PATH_BIN_RPCBIND "
704
+ term_process " $PATH_BIN_RPCBIND "
705
705
fi
706
706
}
707
707
0 commit comments