-
由 Jacob Champion 提交于
The following pipeline: $CAT $SED_TMP_FILE | $TRUSTED_SHELL ${SED_HOST} $DD of=$SED_TMP_FILE > /dev/null 2>&1 when run with a TRUSTED_SHELL that executed the command on the local host, suffered from a race where cat was reading from the file as dd was attempting to truncate it. In situations where dd won that race, the resulting sed command file would be empty, and no change would be made. Simplify the logic by removing all temporary files, and forwarding the sed command file contents to TRUSTED_SHELL via the stdin pipe. Co-authored-by: NShoaib Lari <slari@pivotal.io>
c242c8b5