瀏覽代碼

Check that toxid gets installed

Bob Mottram 8 年之前
父節點
當前提交
4f4354ba19
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      src/freedombone-image-customise

+ 5
- 2
src/freedombone-image-customise 查看文件

@@ -755,8 +755,11 @@ function mesh_tox_avahi {
755 755
 	echo '    exit 2' >> $TEMP_SCRIPT
756 756
 	echo 'fi' >> $TEMP_SCRIPT
757 757
 	echo 'make install' >> $TEMP_SCRIPT
758
+	echo 'if [ ! -f /usr/local/bin/toxavahi ]; then' >> $TEMP_SCRIPT
759
+	echo '  exit 3' >> $TEMP_SCRIPT
760
+	echo 'fi' >> $TEMP_SCRIPT
758 761
 	echo 'toxavahi' >> $TEMP_SCRIPT
759
-	echo 'echo "* *     * * *   root    toxavahi > /dev/null" >> /etc/crontab' >> $TEMP_SCRIPT
762
+	echo 'echo "* *     * * *   root    /usr/local/bin/toxavahi > /dev/null" >> /etc/crontab' >> $TEMP_SCRIPT
760 763
 	echo 'systemctl restart avahi-daemon' >> $TEMP_SCRIPT
761 764
 	echo 'exit 0' >> $TEMP_SCRIPT
762 765
 	chmod +x $TEMP_SCRIPT
@@ -764,7 +767,7 @@ function mesh_tox_avahi {
764 767
 
765 768
 	chroot "$rootdir" /root/$TEMP_SCRIPT_NAME
766 769
 	if [ ! "$?" = "0" ]; then
767
-		echo $'Unable to install toxid'
770
+		echo $"Unable to install toxid, returned $?"
768 771
 		rm $TEMP_SCRIPT
769 772
 		exit 62835
770 773
 	fi