From dc2947f7c5b688016781f3f24cb5123dd584ee7c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 28 Jul 2016 08:27:22 +0100 Subject: [PATCH] Additional tomb inspection --- src/freedombone-image-mesh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index d9285348..c55011dc 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -593,12 +593,16 @@ function setup_amnesic_tox_data { fi # make a temporary password - TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)" tomb dig -s $TOMB_TOX_SIZE_MB /tmp/tox.tomb + if [ ! -f /tmp/tox.tomb ]; then + echo "WARNING: Tomb did not install properly" >> /var/log/${PROJECT_NAME}.log + tomb >> /var/log/${PROJECT_NAME}.log + fi + TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)" tomb forge /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe tomb lock /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe tomb open /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe - # clear the password + # clear the temporary password TOMB_TOX_PASSWORD= if [ -d /media/tox ]; then