File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2439,6 +2439,7 @@ chown -R pi:pi /home/pi/candle/*
24392439
24402440
24412441
2442+
24422443#
24432444# DONE
24442445#
@@ -2451,6 +2452,29 @@ if [ -f /boot/cmdline-candle.txt ]; then
24512452fi
24522453
24532454
2455+ # Fix hostname issue from RC2
2456+ if [ -f /home/pi/.webthings/etc/hostname ] && [ -f /home/pi/.webthings/etc/hosts ]; then
2457+ hostname=" $( cat /home/pi/.webthings/etc/hostname) "
2458+ if ! cat /etc/hosts | grep -q " $hostname " ; then
2459+ echo " hostname was not in /etc/hosts. Attempting to fix."
2460+ echo " before:"
2461+ cat /home/pi/.webthings/etc/hosts
2462+ echo
2463+ sed -i -E -e " s|127\.0\.1\.1[ \t]+.*|127\.0\.1\.1 \t$hostname |" /home/pi/.webthings/etc/hosts
2464+ echo " after:"
2465+ cat /home/pi/.webthings/etc/hosts
2466+ echo
2467+ fi
2468+ else
2469+ echo
2470+ echo " Error, /home/pi/.webthings/etc/hostname and/or /home/pi/.webthings/etc/hosts did not exist"
2471+ echo " Candle: ERROR, /home/pi/.webthings/etc/hostname and/or /home/pi/.webthings/etc/hosts did not e>
2472+ echo " ERROR, /home/pi/.webthings/etc/hostname and/or /home/pi/.webthings/etc/hosts did not exist" >>>
2473+ exit 1
2474+ fi
2475+
2476+
2477+
24542478# cp /home/pi/.webthings/etc/webthings_settings_backup.js /home/pi/.webthings/etc/webthings_settings.js
24552479
24562480if [ -f /boot/candle_first_run_complete.txt ] && [ ! -f /boot/candle_original_version.txt ]; then
@@ -2503,6 +2527,9 @@ echo "$(date) - system update complete" >> /boot/candle_log.txt
25032527
25042528
25052529
2530+
2531+
2532+
25062533# RUN DEBUG SCRIPT
25072534
25082535if [ " $SKIP_DEBUG " = no ] || [[ -z " ${SKIP_DEBUG} " ]];
You can’t perform that action at this time.
0 commit comments