[Fix] Remove rc.local execution before reboot

This commit is contained in:
Ricardo Miranda 2023-02-01 12:29:50 +00:00
parent 4340df8201
commit aadfe66855
1 changed files with 2 additions and 5 deletions

View File

@ -119,7 +119,7 @@ cat <<EOF > /etc/rc.local &&
echo "Expanding /dev/$ROOT_PART" echo "Expanding /dev/$ROOT_PART"
resize2fs /dev/$ROOT_PART resize2fs /dev/$ROOT_PART
rm -f /etc/rc.local; cp -f /etc/rc.local.bak /etc/rc.local; /etc/rc.local rm -f /etc/rc.local; cp -f /etc/rc.local.bak /etc/rc.local
EOF EOF
reboot reboot
@ -131,8 +131,7 @@ raspi_config_expand() {
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
return -1 return -1
else else
rm -f /etc/rc.local; cp -f /etc/rc.local.bak /etc/rc.local; /etc/rc.local rm -f /etc/rc.local; cp -f /etc/rc.local.bak /etc/rc.local
bloom_reset
reboot reboot
exit exit
fi fi
@ -150,9 +149,7 @@ echo "ERROR: Expanding failed..."
sleep 5 sleep 5
if [[ -f /etc/rc.local.bak ]]; then if [[ -f /etc/rc.local.bak ]]; then
cp -f /etc/rc.local.bak /etc/rc.local cp -f /etc/rc.local.bak /etc/rc.local
/etc/rc.local
fi fi
bloom_reset
exit 0 exit 0
EOF1 EOF1
#####End no touch zone##### #####End no touch zone#####