Sfoglia il codice sorgente

Additional tomb inspection

Bob Mottram 8 anni fa
parent
commit
dc2947f7c5
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6
    2
      src/freedombone-image-mesh

+ 6
- 2
src/freedombone-image-mesh Vedi File

593
 	fi
593
 	fi
594
 
594
 
595
 	# make a temporary password
595
 	# make a temporary password
596
-	TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)"
597
 	tomb dig -s $TOMB_TOX_SIZE_MB /tmp/tox.tomb
596
 	tomb dig -s $TOMB_TOX_SIZE_MB /tmp/tox.tomb
597
+	if [ ! -f /tmp/tox.tomb ]; then
598
+		echo "WARNING: Tomb did not install properly" >> /var/log/${PROJECT_NAME}.log
599
+		tomb >> /var/log/${PROJECT_NAME}.log
600
+	fi
601
+	TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)"
598
 	tomb forge /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
602
 	tomb forge /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
599
 	tomb lock /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
603
 	tomb lock /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
600
 	tomb open /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
604
 	tomb open /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
601
-	# clear the password
605
+	# clear the temporary password
602
 	TOMB_TOX_PASSWORD=
606
 	TOMB_TOX_PASSWORD=
603
 
607
 
604
 	if [ -d /media/tox ]; then
608
 	if [ -d /media/tox ]; then