archboot/usr/lib/initcpio/install/archboot_motd

45 lines
2.1 KiB
Text
Raw Normal View History

#!/usr/bin/env bash
2008-12-06 19:12:19 +01:00
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
2008-12-06 19:12:19 +01:00
{
### generate motd
MOTD=$(mktemp /var/tmp/motd.XXXX)
2022-02-01 12:41:53 +01:00
#shellcheck disable=SC2129
2022-01-25 16:51:22 +01:00
echo -e "\033[1mWelcome to \033[36mArch Linux \033[34m(archboot environment)\033[0m" >> "${MOTD}"
echo -e "\033[1m--------------------------------------------\033[0m" >> "${MOTD}"
echo -e "\033[1mConsoles:\033[0m" >> "${MOTD}"
echo -e " - Virtual consoles \033[1m1-6\033[0m are active." >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - To change virtual console use \033[92mALT + F(1-6)\033[0m" >> "${MOTD}"
2022-01-21 14:16:33 +01:00
if echo "${HOOKS[@]}" | grep -q archboot_keymap ; then
2022-01-25 16:51:22 +01:00
echo -e "\033[1mChange keymap and console font:\033[0m" >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - To change to a non-US keymap, type \033[92m'km'\033[0m at the console." >> "${MOTD}"
2008-12-06 19:12:19 +01:00
fi
2022-01-21 14:16:33 +01:00
if echo "${HOOKS[@]}" | grep -q archboot_tz; then
2022-01-25 16:51:22 +01:00
echo -e "\033[1mChange time and date:\033[0m" >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - To change your time and date, type \033[92m'tz'\033[0m at the console." >> "${MOTD}"
2008-12-06 19:12:19 +01:00
fi
2022-04-01 10:56:06 +02:00
echo -e "\033[1mFor wifi authentification to internet access or further online help:\033[0m"
echo -e " - Use the \033[92m'elinks'\033[0m text mode browser."
2022-01-21 14:16:33 +01:00
if echo "${HOOKS[@]}" | grep -q archboot_installer; then
2022-02-01 12:41:53 +01:00
#shellcheck disable=SC2129
2022-01-25 16:51:22 +01:00
echo -e "\033[1mNormal Setup:\033[0m" >> "${MOTD}"
echo -e " - On first login \033[1msetup\033[0m is launched automatically." >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - Please run \033[92m'setup'\033[0m again to install Arch Linux if you left setup." >> "${MOTD}"
2022-04-01 10:42:13 +02:00
echo -e " - Virtual console \033[1m7\033[0m is used for setup logging, use \033[92mALT + F7\033[0m." >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - Run \033[92m'update-installer.sh'\033[0m to get all update options of the installer." >> "${MOTD}"
2022-01-25 16:51:22 +01:00
echo -e "\033[1mFor Experts:\033[0m" >> "${MOTD}"
2022-03-27 08:29:33 +02:00
echo -e " - Use \033[92m'quickinst'\033[0m to install and bypass the setup routine." >> "${MOTD}"
2008-12-06 19:12:19 +01:00
fi
2022-01-21 12:27:31 +01:00
chmod 644 "${MOTD}"
2008-12-06 19:12:19 +01:00
add_file "${MOTD}" "/etc/motd"
}
help ()
{
cat <<HELPEOF
This hook sets up dynamically the motd message, depending on
your system.
HELPEOF
}