X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=arch-init-chroot;h=e1738632e39c27612c3386160be064bacff1cd0a;hp=d2e0f976716b83e93adb7bfce95773836a1d6150;hb=6ca069946c8ff88d79d1ae421e0eda60ae1c514c;hpb=81e0e0b826ebffdee7d809ee4dff1338af7692e1 diff --git a/arch-init-chroot b/arch-init-chroot index d2e0f97..e173863 100755 --- a/arch-init-chroot +++ b/arch-init-chroot @@ -1,15 +1,27 @@ #!/bin/bash -x +# Copyright (C) 2016 Ian Kelling + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -for x in /etc/*.pacorig; do - # This started breaking immediately when I stoped doing genfstab. - # It's probably not needed anymore - [[ -e $x ]] || break - mv $x ${x%.pacorig} -done +# note, when I did genfstab, i +# neeeded to to do for x in mv /etc/*.pacorig; do mv $x ${x%.pacorig}; done + +pacman -Syu -echo $hostname > /etc/hostname [[ -L /etc/localtime ]] || ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime l=en_US.UTF-8 echo "$l UTF-8" > /etc/locale.gen @@ -27,9 +39,9 @@ echo "LANG=$l" > /etc/locale.conf # # https://bugs.archlinux.org/task/42884 # # disabled, as with just the module, startup spammed something about # # command takes a device name and something else. -# sed -ri '/^ *MODULES *=.*btrfs/!s/^( *MODULES *=.*)"/\1 btrfs"/' /etc/mkinitcpio.conf +# sed -ri --follow-symlinks '/^ *MODULES *=.*btrfs/!s/^( *MODULES *=.*)"/\1 btrfs"/' /etc/mkinitcpio.conf # # remove extra space -# sed -ri 's/^( *MODULES *=[^"]*)" */\1"/' /etc/mkinitcpio.conf +# sed -ri --follow-symlinks 's/^( *MODULES *=[^"]*)" */\1"/' /etc/mkinitcpio.conf @@ -65,33 +77,28 @@ k_args=( root=/dev/mapper/crypt_dev_${first_root_dev##*/} resume=${first_root_dev%[0-9]}$swapn ) -extra_encrypt_hooks=() # If we have more than 1 to decrypt, arch wiki lead me onto # a sort of hacky way run the encrypt hook multiple times. -base=/usr/lib/initcpio - - # https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Configuring_mkinitcpio_2 # used to have lvm2 after encrypt for lvm, but not using lvm anymore for x in encrypt btrfs; do - sed -ri -f - /etc/mkinitcpio.conf <