1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

dockerd-rootless.sh: add typo guard

`dockerd-rootless.sh install` is a common typo of `dockerd-rootless-setuptool.sh install`.

Now `dockerd-rootless.sh install` shows human-readable error.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2021-02-02 15:19:50 +09:00
parent 271b43c43f
commit 8dc6c109b5
No known key found for this signature in database
GPG key ID: 49524C6F9F638F1A

View file

@ -18,6 +18,12 @@
# See the documentation for the further information: https://docs.docker.com/engine/security/rootless/ # See the documentation for the further information: https://docs.docker.com/engine/security/rootless/
set -e -x set -e -x
case "$1" in
"check" | "install" | "uninstall")
echo "Did you mean 'dockerd-rootless-setuptool.sh $@' ?"
exit 1
;;
esac
if ! [ -w $XDG_RUNTIME_DIR ]; then if ! [ -w $XDG_RUNTIME_DIR ]; then
echo "XDG_RUNTIME_DIR needs to be set and writable" echo "XDG_RUNTIME_DIR needs to be set and writable"
exit 1 exit 1