#!/usr/bin/env bash cat > "${HOME}"/myfiles/lfs-postinstall.sh <<"EOPF" #!/usr/bin/env bash if ! dpkg -l |grep local-apt-repository then echo "ERROR: execute local-apt-repository.sh first" fi if ! mount |grep cdrom then mount /dev/sr0 fi if ! mount |grep cdrom then echo "ERROR: insert cdrom" exit 1 fi cat > /etc/sudoers.d/lfsdev <<"EOF" lfsdev ALL = NOPASSWD: /usr/bin/chown * /mnt/lfsdev* lfsdev ALL = NOPASSWD: /usr/bin/mount * /mnt/lfsdev* lfsdev ALL = NOPASSWD: /usr/bin/install * /mnt/lfsdev* lfsdev ALL = NOPASSWD: /usr/sbin/chroot /mnt/lfsdev* EOF apt --yes install texinfo m4 bison gawk make patch python3 xz-utils gcc g++ build-essential mv --verbose /etc/bash.bashrc /etc/bash.bashrc.NOUSE pushd /bin || return 1 if [[ $(readlink sh) =~ ^dash$ ]] then rm --verbose sh ln --symbolic --verbose bash sh fi popd || return 1 cat > /home/lfsdev/.lfsdevbuild_config <<"EOCF" # build directory LFS=/mnt/lfsdev # location of local package sources LFS_PACKAGE_DIR=/home/lfsdev/packages # Number of processors to use LFS_NPROC=1 # Bypass step by step validation until a breakpoint LFS_BREAKPOINT=110300 # strip binaries or not LFS_STRIP_BINARIES=true # bypass network config validation by taking network config from host LFS_NETWORKSAMEASHOST=true # bypass network configuration for full offline build LFS_NETWORKOFFLINE=true # bypass linux config validation by taking linux config from host LFS_LINUXCONFIGPROVIDED=true EOCF chown lfsdev:lfsdev /home/lfsdev/.lfsbuild_config EOPF