diff --git a/makeboarddeb.sh b/makeboarddeb.sh index cd2ae3b75..44c5341f4 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -33,11 +33,11 @@ create_board_package() Installed-Size: 1 Section: kernel Priority: optional - Depends: bash, python3-apt + Depends: bash Provides: armbian-bsp Conflicts: armbian-bsp Replaces: base-files - Recommends: fake-hwclock, initramfs-tools + Recommends: bsdutils, parted, python3-apt, util-linux, initramfs-tools Description: Armbian tweaks for $RELEASE on $BOARD ($BRANCH branch) EOF diff --git a/scripts/firstrun b/scripts/firstrun index baed2ca26..943ca5a11 100644 --- a/scripts/firstrun +++ b/scripts/firstrun @@ -7,8 +7,8 @@ # Should-Start: armhwinfo # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: PLEASE BE PATIENT AND DO NOT INTERRUPT THE FIRST REBOOT -# Description: Something needs to be done when is +# Short-Description: PLEASE DO NOT INTERRUPT THE FIRST BOOT +# Description: Something needs to be done when is # starting at first time. # regenerate ssh host key ### END INIT INFO @@ -65,7 +65,11 @@ if [[ "$(apt-cache policy ramlog | grep Installed)" != "" ]]; then fi fi while [ -f /tmp/firstrun_running ]; do sleep 1; done -if [ -f "/var/run/reboot" ]; then reboot; fi +if [ -f "/var/run/reboot" ]; then + wall -n "Performing automatic reboot in 5 seconds" + sleep 5 + reboot +fi rm -f /tmp/create_swap.sh sync & EOT @@ -237,6 +241,8 @@ check_prerequisits() { } # check_prerequisits main() { + touch /tmp/firstrun_running + check_prerequisits collect_information @@ -244,7 +250,6 @@ main() { do_expand_rootfs fi - touch /tmp/firstrun_running /tmp/create_swap.sh & # old distros can't handle allow-hotplug diff --git a/scripts/update-motd.d/98-autoreboot-warn b/scripts/update-motd.d/98-autoreboot-warn new file mode 100644 index 000000000..2312d5338 --- /dev/null +++ b/scripts/update-motd.d/98-autoreboot-warn @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ -f /tmp/firstrun_running ]]; then + printf "\n\e[0;91m Warning: firstrun script is running \x1B[0m \n" + printf "\e[0;91m automatic reboot may be performed soon \x1B[0m \n" +fi + +(sleep 1 && rm "$0") & diff --git a/scripts/update-motd.d/99-point-to-faq b/scripts/update-motd.d/99-point-to-faq index c56e09a10..bc59ec971 100644 --- a/scripts/update-motd.d/99-point-to-faq +++ b/scripts/update-motd.d/99-point-to-faq @@ -4,5 +4,6 @@ if [ "$LINUXFAMILY" = "sun8i" ]; then printf "\nNew to Armbian? Check the Armbian H3 Mini FAQ first:\n\e[0;92m https://github.com/igorpecovnik/lib/blob/master/documentation/H3_mini_faq.md \x1B[0m\n" - (sleep 1 && rm "$0") & fi + +(sleep 1 && rm "$0") &