From: Hugo Villeneuve Date: Sun, 9 Jun 2013 14:43:48 +0000 (-0400) Subject: Use dbus-uuidgen if uuidgen is not available X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=f1dab37189a7666358469648eac9b2e2cf309547;p=hvlinux.git Use dbus-uuidgen if uuidgen is not available --- 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