File tree Expand file tree Collapse file tree
Baseport/UserDataEncryption Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ MOUNT_DIR=""
5858FS_PATH=" "
5959key_id=" "
6060KEY_FILE=" "
61-
61+ # shellcheck disable=SC2317 # cleanup is invoked via trap
6262cleanup () {
6363
6464 if [ -n " ${MOUNT_DIR:- } " ] && [ " ${MOUNT_DIR:- } " != " /" ] && [ -d " ${MOUNT_DIR:- } " ]; then
Original file line number Diff line number Diff line change @@ -182,10 +182,9 @@ detect_online_cpus() {
182182 fi
183183 ONLINE_CPUS=$( expand_list " $ONLINE_STR " )
184184 [ -n " $ONLINE_CPUS " ] || ONLINE_CPUS=" 0"
185- CPU_COUNT=$( printf " %s\n" $ONLINE_CPUS | wc -l | tr -d ' ' )
185+ CPU_COUNT=$( printf ' %s\n' " $ONLINE_CPUS " | awk ' {c += NF} END {print c + 0} ' )
186186}
187187detect_online_cpus
188-
189188# Return online NUMA nodes as CSV (e.g. "0,1")
190189nodes_online () {
191190 if [ -r /sys/devices/system/node/online ]; then
@@ -407,7 +406,7 @@ if [ "$AUTO_DISK" -eq 1 ] && [ -z "$USER_f" ]; then
407406 log_warn " Auto-disk requested but 'df' not available; skipping"
408407 fi
409408fi
410-
409+ # shellcheck disable=SC2317 # cleanup is invoked via trap
411410cleanup_auto_bits () {
412411 [ -n " $LISTENER_PID " ] && kill " $LISTENER_PID " 2> /dev/null
413412 [ -n " $TMPF " ] && rm -f " $TMPF " 2> /dev/null
You can’t perform that action at this time.
0 commit comments