Skip to content

Commit

Permalink
Minor cosmetic tweaks.
Browse files Browse the repository at this point in the history
* create: Adjust indentation and log message.
* README (Installation): Adjust ./configure invokation to work out of
the box.
  • Loading branch information
mbakke committed May 31, 2019
1 parent 1e02a18 commit ef6c540
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions create
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit ef6c540

Please sign in to comment.