X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=arch-init-chroot;h=e1738632e39c27612c3386160be064bacff1cd0a;hb=8bf6d9c4cc9ec88976c62af33f32c0c660e977e0;hp=e4dcb41a82f1b8e514d20851ccc0181af2b261fa;hpb=593c7e9993e4f2110846f869f468c4247a349700;p=automated-distro-installer diff --git a/arch-init-chroot b/arch-init-chroot index e4dcb41..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 <