@@ -244,7 +244,7 @@ sync() {
244244 # previously observed SHA (updated with each file watch) and compare it
245245 # against the new file's SHA. If they differ, it means something has
246246 # changed.
247- new_sha=$( sha256sum " ${filepath} " | awk ' {print $1} ' )
247+ new_sha=$( sha256sum " ${filepath} " | while read -r s _ ; do echo " $s " ; done )
248248 if [ " $new_sha " != " $prev_sha " ]; then
249249 # Create but don't rm old one since we don't know if this will be configured
250250 # to run as _the_ cni plugin.
@@ -271,7 +271,7 @@ monitor_cni_config() {
271271 sync " $filename " " $action " " $cni_conf_sha "
272272 # calculate file SHA to use in the next iteration
273273 if [[ -e " $directory /$filename " ]]; then
274- cni_conf_sha=$( sha256sum " $directory /$filename " | awk ' {print $1} ' )
274+ cni_conf_sha=" $( sha256sum " $directory /$filename " | while read -r s _ ; do echo " $s " ; done) "
275275 fi
276276 fi
277277 done
@@ -321,7 +321,7 @@ monitor_cni_config &
321321# Append our config to any existing config file (*.conflist or *.conf)
322322config_files=$( find " ${HOST_CNI_NET} " -maxdepth 1 -type f \( -iname ' *conflist' -o -iname ' *conf' \) )
323323if [ -z " $config_files " ]; then
324- log " No active CNI configuration files found"
324+ log " No active CNI configuration files found"
325325else
326326 config_file_count=$( echo " $config_files " | grep -v linkerd | sort | wc -l)
327327 if [ " $config_file_count " -eq 0 ]; then
0 commit comments