From 731a6183b90229717a9fbd9851d391ccdf0114f7 Mon Sep 17 00:00:00 2001 From: Zeev Diukman Date: Sun, 18 Jan 2026 09:20:40 +0200 Subject: [PATCH] refactor: Rename `archchroot` function to `chrt` and update user/password setup commands to use the new function. --- z.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/z.sh b/z.sh index 2b4cf6f..9bd87be 100755 --- a/z.sh +++ b/z.sh @@ -7,7 +7,7 @@ selected_disk="/dev/vda" seed_device="/dev/vda1" sprout_device="/dev/vda2" efi_device="/dev/vda3" -archchroot() { +chrt() { [[ "$1" == "--" ]] && shift local cmd="$*" arch-chroot /mnt /usr/bin/bash -c "$cmd" @@ -159,8 +159,8 @@ fi pacstrap -K /mnt ${packages[@]} mount -m "$efi_device" /mnt/efi genfstab -U /mnt > /mnt/etc/fstab -# set root and user passwords -echo "root:root" | arch-chroot /mnt chpasswd -arch-chroot /mnt useradd -m -G wheel -s /usr/bin/bash zeev -echo "zeev:zeev" | arch-chroot /mnt chpasswd -archchroot -- "echo 'zeev ALL=(ALL:ALL) ALL' > /etc/sudoers.d/zeev" \ No newline at end of file + +chrt -- chpasswd "root:root" +chrt -- useradd -m -G wheel -s /usr/bin/bash zeev +chrt -- chpasswd "zeev:zeev" +chrt -- echo 'zeev ALL=(ALL:ALL) ALL' > /etc/sudoers.d/zeev