From 6d5e73c87b45a68285094efc406e5291534660b2 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Wed, 25 May 2022 12:58:01 +0200 Subject: [PATCH] Re-add sudo to CI --- .gitlab-ci.yml | 2 +- arm64-build.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1169b84..2c1da1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ build-arm64: stage: build script: - apt update - - apt install -y curl xz-utils file + - apt install -y curl xz-utils file sudo - ./arm64-build.sh artifacts: paths: diff --git a/arm64-build.sh b/arm64-build.sh index e3a6089..3da00cb 100755 --- a/arm64-build.sh +++ b/arm64-build.sh @@ -13,10 +13,10 @@ OFFSET_IMG=$(file $RASPIOS_IMG | cut -d';' -f3 | cut -d',' -f8 | cut -d' ' -f3) mkdir -p mnt echo "Mounting second partition" -mount $RASPIOS_IMG -o offset=$((512*$OFFSET_IMG)) mnt +sudo mount $RASPIOS_IMG -o offset=$((512*$OFFSET_IMG)) mnt echo "Chroot into partition to start edition" -chroot mnt /bin/sh <<"EOT" +sudo chroot mnt /bin/sh <<"EOT" usermod -l creator pi usermod -d /home/creator -m creator @@ -28,5 +28,5 @@ systemctl enable ssh echo "kenoma" > /etc/hostname EOT -umount mnt +sudo umount mnt xz $RASPIOS_IMG