Skip to content

Commit 2b9dea0

Browse files
Add files via upload
1 parent 48b1172 commit 2b9dea0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

create_latest_candle_dev.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ sed -i 's/#deb-src/deb-src/' /etc/apt/sources.list
764764
if [ "$SKIP_APT_UPGRADE" = no ] || [[ -z "${SKIP_APT_UPGRADE}" ]];
765765
then
766766
echo
767+
echo "doing upgrade first"
767768

768769
# Check if kernel or bootloader can be updated
769770
if apt list --upgradable | grep raspberrypi-bootloader; then
@@ -780,16 +781,18 @@ then
780781
apt-get update -y
781782
apt --fix-broken install -y
782783

783-
if [ -n "$(apt list --upgradable | grep raspberrypi-kernel)" ] || [ -n "$(apt list --upgradable | grep raspberrypi-bootloader)" ]; then
784+
if [ -n "$(apt list --upgradable | grep raspberrypi-kernel)" ] || [ -n "$(apt list --upgradable | grep raspberrypi-bootloader)" ]; then
784785

785786
#apt install -y raspberrypi-kernel
786787
#apt install -y raspberrypi-bootloader
788+
echo "Candle: WARNING, DOING FULL UPGRADE. THIS WILL UPDATE THE KERNEL TOO. Takes a while!"
787789
echo "Candle: WARNING, DOING FULL UPGRADE. THIS WILL UPDATE THE KERNEL TOO. Takes a while!" >> /dev/kmsg
788790
echo "WARNING, DOING FULL UPGRADE. THIS WILL UPDATE THE KERNEL TOO." >> /boot/candle_log.txt
789791

790792
# Allow a kernal update if the disk image is being made right now
791-
if [ -f /boot/candle_first_run_complete.txt ]; then
793+
if [ ! -f /boot/candle_first_run_complete.txt ]; then
792794

795+
echo "no /boot/candle_first_run_complete.txt file yet, probably creating disk image"
793796
# A little overkill:
794797

795798
apt-get update -y
@@ -826,9 +829,6 @@ then
826829
echo "Apt upgrade done" >> /boot/candle_log.txt
827830
echo
828831

829-
830-
831-
832832
echo
833833
echo "rebooting"
834834
echo
@@ -1675,6 +1675,12 @@ fi
16751675
# echo "No new config version detected"
16761676
#fi
16771677

1678+
# This is handled by prepare_disk_image
1679+
#if [ ! -f /boot/candle_first_run_complete.txt ]; then
1680+
# if [ -f /home/pi/candle/candle_first_run.sh ]; then
1681+
# cp /home/pi/candle/candle_first_run.sh /boot/candle_first_run.sh
1682+
# fi
1683+
#fi
16781684
#chmod +x /home/pi/candle_first_run.sh
16791685

16801686
if [ ! -f /home/pi/candle/early.sh ]; then

0 commit comments

Comments
 (0)