X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=arch-init-chroot;h=e1738632e39c27612c3386160be064bacff1cd0a;hp=53a2b944f72ad2583e8d16f0aa9500f4f8633d21;hb=6ca069946c8ff88d79d1ae421e0eda60ae1c514c;hpb=a4bf1d090bfbb5603bd6f2aa9f67a2e8a702d476 diff --git a/arch-init-chroot b/arch-init-chroot index 53a2b94..e173863 100755 --- a/arch-init-chroot +++ b/arch-init-chroot @@ -1,13 +1,28 @@ #!/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 $?"' ERR +trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -for x in /etc/*.pacorig; do - 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 -ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime +[[ -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 locale-gen @@ -24,16 +39,10 @@ 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 -# https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Configuring_mkinitcpio_2 -# used to have lvm2 after encrypt for lvm. -for x in encrypt encrypt1 btrfs; do sed -ri -f - /etc/mkinitcpio.conf < /etc/systemd/network/wired.network < /etc/systemd/network/br0.netdev <