5
5
# https://hub.docker.com/r/erichough/nfs-server
6
6
# https://github.com/ehough/docker-nfs-server
7
7
#
8
- # Copyright (C) 2017-2019 Eric D. Hough
8
+ # Copyright (C) 2017-2020 Eric D. Hough
9
9
#
10
10
# This program is free software: you can redistribute it and/or modify
11
11
# it under the terms of the GNU General Public License as published by
@@ -75,16 +75,6 @@ readonly STATE_NFS_VERSION='nfs_version'
75
75
declare -A state
76
76
77
77
78
- # #####################################################################################
79
- # ## string utils
80
- # #####################################################################################
81
-
82
- toupper () {
83
-
84
- echo " $1 " | awk ' { print toupper($0) }'
85
- }
86
-
87
-
88
78
# #####################################################################################
89
79
# ## logging
90
80
# #####################################################################################
@@ -110,7 +100,7 @@ log_header() {
110
100
111
101
echo "
112
102
==================================================================
113
- $( toupper " $1 " )
103
+ ${1^^}
114
104
=================================================================="
115
105
}
116
106
@@ -341,7 +331,8 @@ assert_port() {
341
331
init_state_logging () {
342
332
343
333
# if the user didn't request a specific log level, the default is INFO
344
- local -r normalized_log_level=$( toupper " ${! ENV_VAR_NFS_LOG_LEVEL:- $LOG_LEVEL_INFO } " )
334
+ local incoming_log_level=" ${! ENV_VAR_NFS_LOG_LEVEL:- $LOG_LEVEL_INFO } "
335
+ local -r normalized_log_level=" ${incoming_log_level^^} "
345
336
346
337
if ! echo " $normalized_log_level " | grep -Eq ' DEBUG|INFO' ; then
347
338
bail " the only acceptable values for $ENV_VAR_NFS_LOG_LEVEL are: DEBUG, INFO"
0 commit comments