2013-07-22 17:57:18 +02:00
|
|
|
#!/usr/bin/env bash
|
2008-12-06 19:12:19 +01:00
|
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
2011-07-06 15:55:39 +02:00
|
|
|
build ()
|
2008-12-06 19:12:19 +01:00
|
|
|
{
|
|
|
|
### generate motd
|
2020-08-15 11:56:31 +02:00
|
|
|
MOTD=$(mktemp /var/tmp/motd.XXXX)
|
2008-12-06 19:12:19 +01:00
|
|
|
echo "Welcome to Arch Linux (archboot environment)" >> ${MOTD}
|
|
|
|
echo "--------------------------------------------" >> ${MOTD}
|
|
|
|
echo "Consoles:" >> ${MOTD}
|
|
|
|
echo " - Virtual consoles 1-6 are active." >> ${MOTD}
|
2012-09-12 09:11:29 +02:00
|
|
|
echo " - To change virtual console use ALT + F(1-6)" >> ${MOTD}
|
2021-09-11 14:27:21 +02:00
|
|
|
if [ "$(echo "${HOOKS[@]}" | grep archboot_keymap)" ]; then
|
2009-04-25 14:27:10 +02:00
|
|
|
echo "Change keymap:" >> ${MOTD}
|
2008-12-06 19:12:19 +01:00
|
|
|
echo " - To change to a non-US keymap, type 'km' at the console." >> ${MOTD}
|
|
|
|
fi
|
2021-09-11 14:27:21 +02:00
|
|
|
if [ "$(echo "${HOOKS[@]}" | grep archboot_tz)" ]; then
|
2009-04-25 14:27:10 +02:00
|
|
|
echo "Change time and date:" >> ${MOTD}
|
|
|
|
echo " - To change your time and date, type 'tz' at the console." >> ${MOTD}
|
2008-12-06 19:12:19 +01:00
|
|
|
fi
|
2021-09-11 14:27:21 +02:00
|
|
|
if [ "$(echo "${HOOKS[@]}" | grep archboot_installer)" ]; then
|
2008-12-06 19:12:19 +01:00
|
|
|
echo "Normal Setup:" >> ${MOTD}
|
|
|
|
echo " - On first login /arch/setup is launched automatically." >> ${MOTD}
|
|
|
|
echo " - Please run '/arch/setup' again to install Arch Linux if you left setup." >> ${MOTD}
|
2012-09-12 09:11:29 +02:00
|
|
|
echo " - vc7 is used for setup logging." >> ${MOTD}
|
2008-12-06 19:12:19 +01:00
|
|
|
echo "For Experts:" >> ${MOTD}
|
|
|
|
echo " - Use '/arch/quickinst' to install and bypass the setup routine." >> ${MOTD}
|
|
|
|
echo "Documentation:" >> ${MOTD}
|
|
|
|
echo " - Documentation can be read by executing:" >> ${MOTD}
|
2009-12-12 09:15:54 +01:00
|
|
|
echo " zcat /arch/archboot.txt.gz | less" >> ${MOTD}
|
2008-12-06 19:12:19 +01:00
|
|
|
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
|
2013-07-22 17:57:18 +02:00
|
|
|
}
|