Skip to content

Commit a623fe4

Browse files
Add files via upload
1 parent fe444cc commit a623fe4

File tree

1 file changed

+73
-70
lines changed

1 file changed

+73
-70
lines changed

create_latest_candle_dev.sh

Lines changed: 73 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,6 @@ if [ "$SKIP_APT_UPGRADE" = no ] || [[ -z "${SKIP_APT_UPGRADE}" ]];
765765
then
766766
echo
767767

768-
apt-mark unhold raspberrypi-kernel
769-
apt-mark unhold raspberrypi-kernel-headers
770-
apt-mark unhold raspberrypi-bootloader
771-
772768
# Check if kernel or bootloader can be updated
773769
if apt list --upgradable | grep raspberrypi-bootloader; then
774770
echo "WARNING, BOOTLOADER IS UPGRADEABLE"
@@ -790,83 +786,90 @@ then
790786
#apt install -y raspberrypi-bootloader
791787
echo "Candle: WARNING, DOING FULL UPGRADE. THIS WILL UPDATE THE KERNEL TOO. Takes a while!" >> /dev/kmsg
792788
echo "WARNING, DOING FULL UPGRADE. THIS WILL UPDATE THE KERNEL TOO." >> /boot/candle_log.txt
793-
794-
# make sure the system is read-write and accessible again after the reboot.
795-
#touch /boot/candle_rw_once.txt
796-
#touch /boot/ssh.txt
797-
798-
789+
790+
# Allow a kernal update if the disk image is being made right now
799791
if [ -f /boot/candle_first_run_complete.txt ]; then
800-
if [ -d seeed-voicecard ]; then
801-
rm -rf seeed-voicecard
802-
fi
803-
git clone --depth 1 https://github.com/HinTak/seeed-voicecard.git
804-
805-
if [ -d seeed-voicecard ]; then
806-
cd seeed-voicecard
807-
808-
if [ ! -f /home/pi/candle/installed_respeaker_version.txt ]; then
809-
touch /home/pi/candle/installed_respeaker_version.txt
810-
fi
811792

812-
./uninstall.sh
793+
# A little overkill:
813794

814-
cd /home/pi
815-
rm -rf seeed-voicecard
816-
817-
else
818-
echo "Error, failed to download respeaker source"
819-
fi
820-
#echo "" > /etc/modules
821-
fi
822-
823-
824-
fi
825-
826-
# A little overkill:
795+
apt-get update -y
796+
DEBIAN_FRONTEND=noninteractive apt full-upgrade -y &
797+
wait
798+
apt --fix-broken install -y
799+
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
800+
echo ""
827801

828-
apt-get update -y
829-
DEBIAN_FRONTEND=noninteractive apt full-upgrade -y &
830-
wait
831-
apt --fix-broken install -y
832-
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
833-
echo ""
834802

803+
#rm -rf /opt/vc/lib
835804

836-
#rm -rf /opt/vc/lib
805+
apt-get update -y
806+
DEBIAN_FRONTEND=noninteractive apt full-upgrade -y &
807+
wait
808+
apt --fix-broken install -y
809+
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
810+
echo ""
837811

838-
apt-get update -y
839-
DEBIAN_FRONTEND=noninteractive apt full-upgrade -y &
840-
wait
841-
apt --fix-broken install -y
842-
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
843-
echo ""
844812

813+
apt-get update -y
814+
DEBIAN_FRONTEND=noninteractive apt upgrade -y &
815+
wait
816+
apt --fix-broken install -y
817+
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
818+
echo ""
845819

846-
apt-get update -y
847-
DEBIAN_FRONTEND=noninteractive apt upgrade -y &
848-
wait
849-
apt --fix-broken install -y
850-
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
851-
echo ""
820+
apt --fix-broken install -y
821+
apt autoremove -y
822+
apt clean -y
823+
echo
824+
echo "Candle: Apt upgrade complete."
825+
echo "Candle: Apt upgrade complete." >> /dev/kmsg
826+
echo "Apt upgrade done" >> /boot/candle_log.txt
827+
echo
828+
829+
852830

853-
apt --fix-broken install -y
854-
apt autoremove -y
855-
apt clean -y
856-
echo
857-
echo "Candle: Apt upgrade complete."
858-
echo "Candle: Apt upgrade complete." >> /dev/kmsg
859-
echo "Apt upgrade done" >> /boot/candle_log.txt
860-
echo
831+
832+
echo
833+
echo "rebooting"
834+
echo
835+
836+
# make sure the system is read-write and accessible again after the reboot.
837+
touch /boot/candle_rw_once.txt
838+
#touch /boot/ssh.txt
839+
840+
reboot
841+
842+
#echo "calling apt upgrade"
843+
#echo "Candle: doing apt upgrade" >> /dev/kmsg
844+
#echo "Candle: doing apt upgrade" >> /boot/candle_log.txt
845+
#DEBIAN_FRONTEND=noninteractive apt-get upgrade -y &
846+
#wait
847+
#echo
848+
#echo "Upgrade complete"
849+
fi
850+
851+
else
852+
echo "not allowing kernel updates for now"
853+
apt-mark unhold raspberrypi-kernel
854+
apt-mark unhold raspberrypi-kernel-headers
855+
apt-mark unhold raspberrypi-bootloader
856+
857+
apt-get update -y
858+
DEBIAN_FRONTEND=noninteractive apt upgrade -y &
859+
wait
860+
apt --fix-broken install -y
861+
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
862+
echo ""
863+
864+
apt-get update -y
865+
DEBIAN_FRONTEND=noninteractive apt upgrade -y &
866+
wait
867+
apt --fix-broken install -y
868+
sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf # Fix potential issue with dhcpdp on Bullseye
869+
echo ""
870+
fi
861871

862872

863-
#echo "calling apt upgrade"
864-
#echo "Candle: doing apt upgrade" >> /dev/kmsg
865-
#echo "Candle: doing apt upgrade" >> /boot/candle_log.txt
866-
#DEBIAN_FRONTEND=noninteractive apt-get upgrade -y &
867-
#wait
868-
#echo
869-
#echo "Upgrade complete"
870873
fi
871874

872875

@@ -1220,7 +1223,7 @@ then
12201223
fi
12211224

12221225

1223-
1226+
# Superfluous?
12241227
if [ "$SKIP_APT_UPGRADE" = no ] || [[ -z "${SKIP_APT_UPGRADE}" ]];
12251228
then
12261229
echo

0 commit comments

Comments
 (0)