iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add rescue, fix default pxe, ubuntu locale
[automated-distro-installer]
/
arch-init
diff --git
a/arch-init
b/arch-init
index e22b37a7ffdd08d7e71a47e1735b82ecf91526ca..a2517eeb5fb421a0911fce26afe8329198d55638 100755
(executable)
--- a/
arch-init
+++ b/
arch-init
@@
-18,16
+18,13
@@
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
-cd $(dirname $(readlink -f "$BASH_SOURCE"))
+x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*}
export HOSTNAME="$1"
mirror=$2
export HOSTNAME="$1"
mirror=$2
-TPPASS="$(cat /root/shadow/traci-simple)"
(( $# >= 1 )) || { echo "$0: error: need 1 or 2 arguments"; exit 1; }
(( $# >= 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
rm -f /etc/pacman.d/mirrorlist
# https://wiki.archlinux.org/index.php/Mirrors#Sorting_mirrors
@@
-48,7
+45,7
@@
export PARTITION_PROMPT=true
# to be idempotent if we fail after partitioning
already_partitioned=true
mount_out=$(mount)
# to be idempotent if we fail after partitioning
already_partitioned=true
mount_out=$(mount)
-for dir in /mnt{,/home,/boot,/
q
}; do
+for dir in /mnt{,/home,/boot,/
a
}; do
regex=" on $dir "
if [[ ! $mount_out =~ $regex ]]; then
already_partitioned=false
regex=" on $dir "
if [[ ! $mount_out =~ $regex ]]; then
already_partitioned=false
@@
-73,8
+70,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
if ! $already_partitioned; then
mount -o subvol=root_$DISTRO $ROOT_PARTITION /mnt
- mkdir -p /mnt/{q,home,boot}
- mount -o subvol=q $ROOT_PARTITION /mnt/q
+ mkdir -p /mnt/boot
mount -o subvol=boot_$DISTRO $BOOT_PARTITION /mnt/boot
fi
mount -o subvol=boot_$DISTRO $BOOT_PARTITION /mnt/boot
fi
@@
-90,8
+86,6
@@
fi
pacstrap /mnt base
cp /tmp/fai/{fstab,crypttab} /mnt/etc
cp /a/bin/fai/encrypt /mnt/usr/lib/initcpio/hooks
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
cp -r /root/.ssh /mnt/root
@@
-101,8
+95,8
@@
bindmount() {
mkdir -p $mountpoint
mount -o bind $source $mountpoint
}
mkdir -p $mountpoint
mount -o bind $source $mountpoint
}
-bindmount /a /mnt/a
bindmount /root/shadow /mnt/q/root/shadow
bindmount /root/shadow /mnt/q/root/shadow
+bindmount /a /mnt/a
mkdir -p /mnt/etc/ssh
cp /etc/ssh/ssh_host_* /mnt/etc/ssh
mkdir -p /mnt/etc/ssh
cp /etc/ssh/ssh_host_* /mnt/etc/ssh