@@ -245,31 +245,6 @@ stop() {
245
245
# ## runtime environment detection
246
246
# #####################################################################################
247
247
248
- get_requested_nfs_version () {
249
-
250
- echo " ${state[$STATE_NFS_VERSION]} "
251
- }
252
-
253
- get_requested_port_mountd () {
254
-
255
- echo " ${state[$STATE_MOUNTD_PORT]} "
256
- }
257
-
258
- get_requested_port_nfsd () {
259
-
260
- echo " ${state[$STATE_NFSD_PORT]} "
261
- }
262
-
263
- get_requested_port_statd_in () {
264
-
265
- echo " ${state[$STATE_STATD_PORT_IN]} "
266
- }
267
-
268
- get_requested_port_statd_out () {
269
-
270
- echo " ${state[$STATE_STATD_PORT_OUT]} "
271
- }
272
-
273
248
is_kerberos_requested () {
274
249
275
250
[[ -n " ${! ENV_VAR_NFS_ENABLE_KERBEROS} " ]] && return 0 || return 1
@@ -285,6 +260,11 @@ is_idmapd_requested() {
285
260
[[ -f " $PATH_FILE_ETC_IDMAPD_CONF " ]] && return 0 || return 1
286
261
}
287
262
263
+ is_logging_debug () {
264
+
265
+ [[ -n ${state[$STATE_IS_LOGGING_DEBUG]} ]] && return 0 || return 1
266
+ }
267
+
288
268
is_kernel_module_loaded () {
289
269
290
270
local -r module=$1
@@ -310,16 +290,6 @@ has_linux_capability() {
310
290
return 1
311
291
}
312
292
313
- get_requested_count_nfsd_threads () {
314
-
315
- echo " ${state[$STATE_NFSD_THREAD_COUNT]} "
316
- }
317
-
318
- is_logging_debug () {
319
-
320
- [[ -n ${state[$STATE_IS_LOGGING_DEBUG]} ]] && return 0 || return 1
321
- }
322
-
323
293
324
294
# #####################################################################################
325
295
# ## runtime configuration assertions
@@ -568,7 +538,7 @@ boot_helper_mount() {
568
538
569
539
boot_helper_get_version_flags () {
570
540
571
- local -r requested_version=" $( get_requested_nfs_version ) "
541
+ local -r requested_version=" ${state[$STATE_NFS_VERSION]} "
572
542
local flags=(' --nfs-version' " $requested_version " ' --no-nfs-version' 2)
573
543
574
544
if ! is_nfs3_enabled; then
@@ -638,7 +608,7 @@ boot_main_mountd() {
638
608
639
609
local version_flags
640
610
read -r -a version_flags <<< " $(boot_helper_get_version_flags)"
641
- local -r port=$( get_requested_port_mountd )
611
+ local -r port=" ${state[$STATE_MOUNTD_PORT]} "
642
612
local args=(' --port' " $port " " ${version_flags[@]} " )
643
613
if is_logging_debug; then
644
614
args+=(' --debug' ' all' )
@@ -679,8 +649,8 @@ boot_main_statd() {
679
649
return
680
650
fi
681
651
682
- local -r port_in=$( get_requested_port_statd_in )
683
- local -r port_out=$( get_requested_port_statd_out )
652
+ local -r port_in=" ${state[$STATE_STATD_PORT_IN]} "
653
+ local -r port_out=" ${state[$STATE_STATD_PORT_OUT]} "
684
654
local -r args=(' --no-notify' ' --port' " $port_in " ' --outgoing-port' " $port_out " )
685
655
686
656
boot_helper_start_daemon " starting statd on port $port_in (outgoing from port $port_out )" $PATH_BIN_STATD " ${args[@]} "
@@ -690,8 +660,8 @@ boot_main_nfsd() {
690
660
691
661
local version_flags
692
662
read -r -a version_flags <<< " $(boot_helper_get_version_flags)"
693
- local -r threads=$( get_requested_count_nfsd_threads )
694
- local -r port=$( get_requested_port_nfsd )
663
+ local -r threads=" ${state[$STATE_NFSD_THREAD_COUNT]} "
664
+ local -r port=" ${state[$STATE_NFSD_PORT]} "
695
665
local args=(' --tcp' ' --udp' ' --port' " $port " " ${version_flags[@]} " " $threads " )
696
666
697
667
if is_logging_debug; then
@@ -726,7 +696,7 @@ boot_main_svcgssd() {
726
696
727
697
summarize_nfs_versions () {
728
698
729
- local -r reqd_version=" $( get_requested_nfs_version ) "
699
+ local -r reqd_version=" ${state[$STATE_NFS_VERSION]} "
730
700
local versions=' '
731
701
732
702
case " $reqd_version " in
@@ -777,9 +747,9 @@ summarize_exports() {
777
747
778
748
summarize_ports () {
779
749
780
- local -r port_nfsd=" $( get_requested_port_nfsd ) "
781
- local -r port_mountd=" $( get_requested_port_mountd ) "
782
- local -r port_statd_in=" $( get_requested_port_statd_in ) "
750
+ local -r port_nfsd=" ${state[$STATE_NFSD_PORT]} "
751
+ local -r port_mountd=" ${state[$STATE_MOUNTD_PORT]} "
752
+ local -r port_statd_in=" ${state[$STATE_STATD_PORT_IN]} "
783
753
784
754
if ! is_nfs3_enabled; then
785
755
log " list of container ports that should be exposed: $port_nfsd (TCP)"
0 commit comments