From f1dab37189a7666358469648eac9b2e2cf309547 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sun, 9 Jun 2013 10:43:48 -0400 Subject: [PATCH] Use dbus-uuidgen if uuidgen is not available --- stage0/create-version | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/stage0/create-version b/stage0/create-version index eb4b012..a5df707 100755 --- a/stage0/create-version +++ b/stage0/create-version @@ -9,17 +9,23 @@ create_hvlinux_version() if [ ! -f ${CFG_DIR}/${HV_VER_FILE} ]; then echo "Create new hvlinux-version file" - if [ ! -x /usr/bin/uuidgen ]; then - echo "Error, missing /usr/bin/uuidgen program" - exit 1 - fi + UUIDGEN=/usr/bin/uuidgen + + if [ ! -x ${UUIDGEN} ]; then + UUIDGEN=/usr/bin/dbus-uuidgen + + if [ ! -x ${UUIDGEN} ]; then + echo "Error, missing /usr/bin/uuidgen program" + exit 1 + fi + fi cat > ${CFG_DIR}/${HV_VER_FILE} <> ${CFG_DIR}/${HV_VER_FILE} + echo "HVUUID=$(${UUIDGEN})" >> ${CFG_DIR}/${HV_VER_FILE} echo "HVDATE=\"$(date)\"" >> ${CFG_DIR}/${HV_VER_FILE} fi -- 2.20.1