mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
40 lines
1.8 KiB
Bash
40 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
build ()
|
|
{
|
|
### generate motd
|
|
MOTD=$(mktemp /var/tmp/motd.XXXX)
|
|
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}"
|
|
echo -e " - To change virtual console use \033[32mALT + F(1-6)\033[0m" >> "${MOTD}"
|
|
if echo "${HOOKS[@]}" | grep -q archboot_keymap ; then
|
|
echo -e "\033[1mChange keymap and console font:\033[0m" >> "${MOTD}"
|
|
echo -e " - To change to a non-US keymap, type \033[32m'km'\033[0m at the console." >> "${MOTD}"
|
|
fi
|
|
if echo "${HOOKS[@]}" | grep -q archboot_tz; then
|
|
echo -e "\033[1mChange time and date:\033[0m" >> "${MOTD}"
|
|
echo -e " - To change your time and date, type \033[32m'tz'\033[0m at the console." >> "${MOTD}"
|
|
fi
|
|
if echo "${HOOKS[@]}" | grep -q archboot_installer; then
|
|
echo -e "\033[1mNormal Setup:\033[0m" >> "${MOTD}"
|
|
echo -e " - On first login \033[1msetup\033[0m is launched automatically." >> "${MOTD}"
|
|
echo -e " - Please run \033[32m'setup'\033[0m again to install Arch Linux if you left setup." >> "${MOTD}"
|
|
echo -e " - Virtual console 7 is used for setup logging, use \033[32mALT + F7\033[0m." >> "${MOTD}"
|
|
echo -e " - Run \033[32m'update-installer.sh'\033[0m to get all update options of the installer." >> "${MOTD}"
|
|
echo -e "\033[1mFor Experts:\033[0m" >> "${MOTD}"
|
|
echo -e " - Use \033[32m'quickinst'\033[0m to install and bypass the setup routine." >> "${MOTD}"
|
|
fi
|
|
chmod 644 "${MOTD}"
|
|
add_file "${MOTD}" "/etc/motd"
|
|
}
|
|
|
|
help ()
|
|
{
|
|
cat <<HELPEOF
|
|
This hook sets up dynamically the motd message, depending on
|
|
your system.
|
|
HELPEOF
|
|
}
|