mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
Add MOTD warning about possible reboot
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
8
scripts/update-motd.d/98-autoreboot-warn
Normal file
8
scripts/update-motd.d/98-autoreboot-warn
Normal file
@@ -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") &
|
||||
@@ -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") &
|
||||
|
||||
Reference in New Issue
Block a user