arguments passed to printf are more generic

On systems that /bin/sh is served by shells other than bash, or 
shells that don't implement the same syntax as the bash printf builtin,
printf -- fails to produce the output necessary for standalone operation.

The test case for this was SmartOS, which uses ksh93 as its /bin/sh.

This change uses the more generic method of passing a format parameter
of a single string, and then the argument to replace it with.
This commit is contained in:
Jeff Goeke-Smith 2021-04-29 16:46:32 -04:00 committed by GitHub
parent edd46eb3d1
commit 81b2d0732f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2357,7 +2357,7 @@ _startserver() {
echo 'HTTP/1.0 200 OK'; \ echo 'HTTP/1.0 200 OK'; \
echo 'Content-Length\: $_content_len'; \ echo 'Content-Length\: $_content_len'; \
echo ''; \ echo ''; \
printf -- '$content';" & printf '%s' '$content';" &
serverproc="$!" serverproc="$!"
} }