mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
42 lines
No EOL
1.5 KiB
Bash
42 lines
No EOL
1.5 KiB
Bash
#!/bin/bash
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
build ()
|
|
{
|
|
### generate motd
|
|
MOTD=$(mktemp /tmp/motd.XXXX)
|
|
echo "Welcome to Arch Linux (archboot environment)" >> ${MOTD}
|
|
echo "--------------------------------------------" >> ${MOTD}
|
|
echo "Consoles:" >> ${MOTD}
|
|
echo " - Virtual consoles 1-6 are active." >> ${MOTD}
|
|
echo " - To change virtual console use ALT + F(1-6)" >> ${MOTD}
|
|
if [ "$(echo $HOOKS | grep arch_keymap)" ]; then
|
|
echo "Change keymap:" >> ${MOTD}
|
|
echo " - To change to a non-US keymap, type 'km' at the console." >> ${MOTD}
|
|
fi
|
|
if [ "$(echo $HOOKS | grep arch_tz)" ]; then
|
|
echo "Change time and date:" >> ${MOTD}
|
|
echo " - To change your time and date, type 'tz' at the console." >> ${MOTD}
|
|
fi
|
|
if [ "$(echo $HOOKS | grep arch_installer)" ]; then
|
|
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}
|
|
echo " - vc7 is used for setup logging." >> ${MOTD}
|
|
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}
|
|
echo " zcat /arch/archboot.txt.gz | less" >> ${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
|
|
} |