mirror of
https://github.com/RomainClaret/lfs-7.8.git
synced 2025-07-28 23:22:36 +00:00
89 lines
2.1 KiB
Bash
89 lines
2.1 KiB
Bash
#!/bin/bash
|
|
|
|
CHAPTER_SECTION=8
|
|
INSTALL_NAME=etc-inputrc
|
|
|
|
echo ""
|
|
echo "### ---------------------------"
|
|
echo "### ETC-INPUTRC ###"
|
|
echo "### CHAPTER 7.$CHAPTER_SECTION ###"
|
|
echo "### Create the /etc/inputrc File"
|
|
echo "### Must be run as \"chroot\" user"
|
|
echo "### ---------------------------"
|
|
|
|
echo ""
|
|
echo "... Loading commun functions and variables"
|
|
if [ ! -f ./script-all_commun-functions.sh ]
|
|
then
|
|
echo "!! Fatal Error 1: './script-all_commun-functions.sh' not found."
|
|
exit 1
|
|
fi
|
|
source ./script-all_commun-functions.sh
|
|
|
|
if [ ! -f ./script-all_commun-variables.sh ]
|
|
then
|
|
echo "!! Fatal Error 1: './script-all_commun-variables.sh' not found."
|
|
exit 1
|
|
fi
|
|
source ./script-all_commun-variables.sh
|
|
|
|
echo ""
|
|
echo "... Validating the environment"
|
|
is_user root
|
|
check_chroot
|
|
|
|
echo ""
|
|
echo "... Setup building environment"
|
|
LOG_FILE=$LFS_BUILD_LOGS_7$CHAPTER_SECTION-$INSTALL_NAME
|
|
|
|
echo ""
|
|
echo "... Creating /etc/inputrc"
|
|
cat > /etc/inputrc << "EOF"
|
|
# Begin /etc/inputrc
|
|
# Modified by Chris Lynn <roryo@roryo.dynup.net>
|
|
# Allow the command prompt to wrap to the next line
|
|
set horizontal-scroll-mode Off
|
|
# Enable 8bit input
|
|
set meta-flag On
|
|
set input-meta On
|
|
# Turns off 8th bit stripping
|
|
set convert-meta Off
|
|
# Keep the 8th bit for display
|
|
set output-meta On
|
|
# none, visible or audible
|
|
set bell-style none
|
|
# All of the following map the escape sequence of the value
|
|
# contained in the 1st argument to the readline specific functions
|
|
"\eOd": backward-word
|
|
"\eOc": forward-word
|
|
# for linux console
|
|
"\e[1~": beginning-of-line
|
|
"\e[4~": end-of-line
|
|
"\e[5~": beginning-of-history
|
|
"\e[6~": end-of-history
|
|
"\e[3~": delete-char
|
|
"\e[2~": quoted-insert
|
|
# for xterm
|
|
"\eOH": beginning-of-line
|
|
"\eOF": end-of-line
|
|
# for Konsole
|
|
"\e[H": beginning-of-line
|
|
"\e[F": end-of-line
|
|
# End /etc/inputrc
|
|
EOF
|
|
|
|
|
|
echo ""
|
|
echo "... Review content of /etc/inputrc "
|
|
cat /etc/inputrc | tee $LOG_FILE-inputrc.log
|
|
echo "<-- End"
|
|
|
|
echo ""
|
|
echo "######### END OF CHAPTER 7.$CHAPTER_SECTION ########"
|
|
echo "///// HUMAN REQUIRED \\\\\\\\\\\\\\\\\\\\"
|
|
echo "### Please run the next step:"
|
|
echo "### ./7.9-chroot_etc-shells.sh"
|
|
echo ""
|
|
|
|
exit 0
|