From a7bcf34432b880e8132ad513ae2c539b97022278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 23 Jan 2020 17:35:46 +0100 Subject: [PATCH] Fix checks for curl/mktemp/growpart presence --- bin/uncloud-init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/uncloud-init b/bin/uncloud-init index 443941c..612aac1 100755 --- a/bin/uncloud-init +++ b/bin/uncloud-init @@ -65,12 +65,12 @@ deploy_ssh_authorized_keys () { return fi - if [ ! -x "$(command -v curl)" ]; then + if ! command -v curl; then echo "Could not find or execute curl. Exiting." >&2 exit 1 fi - if [ ! -x "$(command -v mktemp)" ]; then + if ! command -v mktemp; then echo "Could not find or execute mktemp. Exiting." >&2 exit 1 fi @@ -89,7 +89,7 @@ deploy_ssh_authorized_keys () { grow_root_partition () { growpart_script='uncloud-init-growpart' - if [ -x "$(command -v "$growpart_script")" ]; then + if command -v "$growpart_script"; then # TODO: this command seems quite fragile... # sh growpart -q /dev/vda 3 > /dev/null; true # no-op