X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=arch-init;h=2f14ad60bc1485a6f325f722bab9c59863e1fe09;hp=aa26ffdf68ac2a9051d562282c76207645a74613;hb=HEAD;hpb=7f77555b3d92709034fe41919358053c650c71e1 diff --git a/arch-init b/arch-init index aa26ffd..2f14ad6 100755 --- a/arch-init +++ b/arch-init @@ -15,19 +15,14 @@ # 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 - -x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} +x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" +cd ${x%/*} export HOSTNAME="$1" mirror=$2 -TPPASS="$(cat /root/shadow/traci-simple)" (( $# >= 1 )) || { echo "$0: error: need 1 or 2 arguments"; exit 1; } -mv /root/devbyid /usr/bin - rm -f /etc/pacman.d/mirrorlist # https://wiki.archlinux.org/index.php/Mirrors#Sorting_mirrors @@ -73,8 +68,7 @@ sed -ri --follow-symlinks "/^crypt_dev_\S+$rootn /d" /tmp/fai/crypttab if ! $already_partitioned; then mount -o subvol=root_$DISTRO $ROOT_PARTITION /mnt - mkdir -p /mnt/{a,home,boot} - mount -o subvol=a $ROOT_PARTITION /mnt/a + mkdir -p /mnt/boot mount -o subvol=boot_$DISTRO $BOOT_PARTITION /mnt/boot fi @@ -90,8 +84,6 @@ fi pacstrap /mnt base cp /tmp/fai/{fstab,crypttab} /mnt/etc cp /a/bin/fai/encrypt /mnt/usr/lib/initcpio/hooks -# not needed anymore -#cp /usr/bin/devbyid /mnt/root cp -r /root/.ssh /mnt/root @@ -102,6 +94,7 @@ bindmount() { mount -o bind $source $mountpoint } bindmount /root/shadow /mnt/q/root/shadow +bindmount /a /mnt/a mkdir -p /mnt/etc/ssh cp /etc/ssh/ssh_host_* /mnt/etc/ssh