From c6d03c77356150f449d8d7970d8a8b3295fa3d8b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 18 Jul 2023 14:17:12 +0200 Subject: [PATCH] [alpin installer] switch back to sudo --- alpine-install-on-disk.sh | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/alpine-install-on-disk.sh b/alpine-install-on-disk.sh index baae22c..8b5a632 100755 --- a/alpine-install-on-disk.sh +++ b/alpine-install-on-disk.sh @@ -55,27 +55,27 @@ dd if=/dev/zero of=${DISK} bs=1M count=2 case "$BOOT_VIA" in bios) - doas sfdisk "$DISK" <&2 @@ -84,24 +84,24 @@ EOF esac -# keep right permissions, use doas -doas tar xf $IMAGE -C $rootfs_tmpdir +# keep right permissions, use sudo +sudo tar xf $IMAGE -C $rootfs_tmpdir # These are required by grub-install # And also for generating grub config that contains rootfstype for dir in dev proc sys; do - doas mount --bind /${dir} ${rootfs_tmpdir}/${dir} + sudo mount --bind /${dir} ${rootfs_tmpdir}/${dir} done # Add SSH keys run_root mkdir -p root/.ssh -doas cp $SSH_KEYS $rootfs_tmpdir/root/.ssh/authorized_keys +sudo cp $SSH_KEYS $rootfs_tmpdir/root/.ssh/authorized_keys run_root chown root:root /root/.ssh/authorized_keys run_root chmod 0600 /root/.ssh/authorized_keys run_root chmod 0700 /root/.ssh # Import local resolv.conf. -doas cp "$RESOLVCONF" $rootfs_tmpdir/etc/resolv.conf +sudo cp "$RESOLVCONF" $rootfs_tmpdir/etc/resolv.conf # Generate fstab which is later included in the initramfs @@ -125,7 +125,7 @@ run_root rc-update add sysctl run_root rc-update add modules run_root sed -i 's/root:!::0:::::/root:*::0:::::/' /etc/shadow -doas tee "$rootfs_tmpdir/etc/network/interfaces" <