X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=arch-init-chroot;h=e1738632e39c27612c3386160be064bacff1cd0a;hp=abd9a08ae8c3cc67abbf9e2cf6caa21ad37fa76e;hb=HEAD;hpb=affd7d3cdd0671dcca07f29de9c86b5e3b57ea1f diff --git a/arch-init-chroot b/arch-init-chroot index abd9a08..e173863 100755 --- a/arch-init-chroot +++ b/arch-init-chroot @@ -1,4 +1,19 @@ #!/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 @@ -62,15 +77,11 @@ 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 @@ -85,10 +96,9 @@ s#^\s*FILES=.*#FILES="/crypto_keyfile.bin"# EOF echo "$0: FILES:" grep FILES /etc/mkinitcpio.conf -k_args="${k_args[*]}" -echo "$0: grub cmdline additions: $k_args" +echo "$0: grub cmdline additions: ${k_args[*]}" sed -ri --follow-symlinks -f - /etc/default/grub <