diff --git a/bin/uncloud-init b/bin/uncloud-init index 670f956..9ce57ef 100755 --- a/bin/uncloud-init +++ b/bin/uncloud-init @@ -77,16 +77,14 @@ deploy_ssh_authorized_keys () { curl_output=$(mktemp) if ! curl "$UNCLOUD_METADATA_SERVER/fnux" --output "$curl_output"; then - echo "Something went wrong fetching the authorized_keys file from the \ - metedata server." >&2 + echo "Something went wrong fetching the authorized_keys file from the metedata server." >&2 echo "CURL Output: $(cat "$curl_output")" rm "$curl_output" exit 1 fi mv "$curl_output" "$authorized_keys_file" - echo "Deployed $(wc -l < "$authorized_keys_file") entries in \ - $authorized_keys_file." + echo "Deployed $(wc -l < "$authorized_keys_file") entries in $authorized_keys_file." } grow_root_partition () { @@ -112,21 +110,21 @@ up_network_interfaces () { ### # Entrypoint. -if [ $ENABLE_NETWORKING ]; then +if [ "$ENABLE_NETWORKING" = '1' ]; then routine='up main network interface' echo "--- RUNNING $routine..." up_network_interfaces echo "--- DONE with $routine." fi -if [ $DEPLOY_SSH_AUTHORIZED_KEYS ]; then +if [ "$DEPLOY_SSH_AUTHORIZED_KEYS" = '1' ]; then routine='SSH authorized_keys deployment routine' echo "--- RUNNING $routine..." deploy_ssh_authorized_keys echo "--- DONE with $routine." fi -if [ $GROW_ROOT_PARTITION ]; then +if [ "$GROW_ROOT_PARTITION" = '1' ]; then routine='growing root partition and filesystem' echo "--- RUNNING $routine..." grow_root_partition