start of configuration

This commit is contained in:
YellowJacketLinux 2024-10-10 14:50:01 -07:00
parent 2908ed7705
commit cf2cc6b93b
2 changed files with 110 additions and 0 deletions

66
CH9Config/00-Generic.sh Normal file
View File

@ -0,0 +1,66 @@
#!/bin/bash
# hostname
echo "localhost" > /etc/hostname
# system locale
echo FONT=Lat2-Terminus16 > /etc/vconsole.conf
# /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 8-bit 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
# /etc/shells
cat > /etc/shells << "EOF"
# Begin /etc/shells
/bin/sh
/bin/bash
# End /etc/shells
EOF

44
CH9Config/01-USBFlash.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
# Do not try to bring up the network when booted from a thumb drive
systemctl disable systemd-networkd-wait-online
# hostname
echo "lfsusb" > /etc/hostname
# LFS user
groupadd lfs
useradd -d /home/lfs -s /bin/bash -g lfs -m -k /dev/null lfs
# fix permissions
chown -R lfs:lfs /home/lfs
# login scripts
cat > /home/lfs/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF
chown lfs:lfs /home/lfs/.bash_profile
cat > /home/lfs/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/newlfs
LC_ALL=POSIX
LFS_TGT=x86_64-lfs-linux-gnu
PATH=/usr/bin
if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
PATH=$LFS/tools/bin:$PATH
CONFIG_SITE=$LFS/usr/share/config.site
export LFS LC_ALL LFS_TGT PATH CONFIG_SITE
# below is conservative but safe
export MAKEFLAGS=-j8
EOF
echo "Please set the password for the lfs user:"
echo " passwd lfs"
echo