From ef6c540a7db1651785bd68a5da1b82b859374b45 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 31 May 2019 13:44:37 +0200 Subject: [PATCH] Minor cosmetic tweaks. * create: Adjust indentation and log message. * README (Installation): Adjust ./configure invokation to work out of the box. --- README | 2 +- create | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README b/README index 3e82645..5333deb 100644 --- a/README +++ b/README @@ -29,7 +29,7 @@ Behind the scenes, this is a simple wrapper for 'guix system vm-image'. Installation: - $ ./configure --with-os-dir=/srv/ganeti/os --sysconfdir=/etc + $ ./configure --sysconfdir=/etc --localstatedir=/var $ make && sudo make install Dependencies: diff --git a/create b/create index 5dc5bfa..f0c1809 100755 --- a/create +++ b/create @@ -24,7 +24,7 @@ GUIX_PULL_PROFILE="${GUIXPROFILEDIR}/${INSTANCE_NAME}" trap "rm -f $CONFIG_FILE" EXIT INT TERM if [ ! -d "$CACHE_DIR" ]; then - mkdir -p "$CACHE_DIR" + mkdir -p "$CACHE_DIR" fi # Make Guix use the specified CACHE_DIR. export XDG_CACHE_HOME=$CACHE_DIR @@ -50,17 +50,17 @@ $GUIX --version # be mistaken for commands, so gibberize it through base64. # TODO: Support plain text for API users. if [ -n "$OSP_CONFIG" ]; then - echo "${OSP_CONFIG}" | base64 -di > $CONFIG_FILE + echo "${OSP_CONFIG}" | base64 -di > $CONFIG_FILE else - # If no configuration file was provided, use a default one. - cp -L $DEFAULT_CONFIG $CONFIG_FILE + log_error "No configuration provided, using ${DEFAULT_CONFIG}." + cp -L $DEFAULT_CONFIG $CONFIG_FILE fi if [ -b $TARGET_DEVICE ]; then - DEVICE_SIZE=$($BLOCKDEV --getsize64 $TARGET_DEVICE) + DEVICE_SIZE=$($BLOCKDEV --getsize64 $TARGET_DEVICE) else - # Not a real block device. Assume file disk and just use 'du'. - DEVICE_SIZE=$(du --bytes $TARGET_DEVICE) + # Not a real block device. Assume file disk and just use 'du'. + DEVICE_SIZE=$(du --bytes $TARGET_DEVICE) fi # Pull the user-specified Guix version, if applicable.