mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-12 23:09:33 +01:00
docker: pass entrypoint arguments to weed without splitting them (#12589)
The master, volume, volume-rust, server, mini, filer and s3 cases and the fallback forwarded the user arguments as an unquoted $@, so the shell split each one at whitespace and globbed it against /data. An -admin.password with a space reached weed as two words, and weed ignored every flag after the stray word. Quote "$@" as the other cases already do; $ARGS stays unquoted since the script builds it from its own words. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bef1b13b3d
commit
4ee82977af
1 file changed
+8
-8
@@ -64,7 +64,7 @@ case "$1" in
|
||||
'master')
|
||||
ARGS="-mdir=/data -volumeSizeLimitMB=1024"
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true master $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true master $ARGS "$@"
|
||||
;;
|
||||
|
||||
'volume')
|
||||
@@ -73,7 +73,7 @@ case "$1" in
|
||||
ARGS="-dir=/data"
|
||||
fi
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true volume $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true volume $ARGS "$@"
|
||||
;;
|
||||
|
||||
'volume-rust')
|
||||
@@ -87,7 +87,7 @@ case "$1" in
|
||||
echo "Use 'volume' for the Go volume server instead." >&2
|
||||
exit 1
|
||||
fi
|
||||
exec /usr/bin/weed-volume $ARGS $@
|
||||
exec /usr/bin/weed-volume $ARGS "$@"
|
||||
;;
|
||||
|
||||
'worker-rust')
|
||||
@@ -119,7 +119,7 @@ case "$1" in
|
||||
ARGS="-dir=/data -master.volumeSizeLimitMB=1024"
|
||||
fi
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true server $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true server $ARGS "$@"
|
||||
;;
|
||||
|
||||
'mini')
|
||||
@@ -128,19 +128,19 @@ case "$1" in
|
||||
ARGS=""
|
||||
fi
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true mini $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true mini $ARGS "$@"
|
||||
;;
|
||||
|
||||
'filer')
|
||||
ARGS=""
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true filer $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true filer $ARGS "$@"
|
||||
;;
|
||||
|
||||
's3')
|
||||
ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE"
|
||||
shift
|
||||
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
|
||||
exec /usr/bin/weed -logtostderr=true s3 $ARGS "$@"
|
||||
;;
|
||||
|
||||
'shell')
|
||||
@@ -150,6 +150,6 @@ case "$1" in
|
||||
;;
|
||||
|
||||
*)
|
||||
exec /usr/bin/weed $@
|
||||
exec /usr/bin/weed "$@"
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user