From 18470ce26daa9886b6b098d2b673f46ed7cd1900 Mon Sep 17 00:00:00 2001 From: Dan Johansen Date: Mon, 22 Aug 2022 12:57:05 +0200 Subject: [PATCH] fix inclusion of boot partition in fstab and do some small cleanups, fixes #48 Signed-off-by: Dan Johansen --- manjaro-arm-installer | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/manjaro-arm-installer b/manjaro-arm-installer index ae23d33..89c8ca5 100755 --- a/manjaro-arm-installer +++ b/manjaro-arm-installer @@ -2,7 +2,7 @@ # Set globals # ***************************** -VERSION="1.5.0" +VERSION="1.5.1" # ***************************** TMPDIR=/var/tmp/manjaro-arm-installer ARCH='aarch64' @@ -127,6 +127,15 @@ create_install() { info "Extracting $ARCH rootfs..." bsdtar -xpf $TMPDIR/Manjaro-ARM-$ARCH-latest.tar.gz -C $TMPDIR/root + # Create a "marker" that tells the packages that they're installed as part of building + # an image, which is currently used by the "generic-post-install" package only + touch $TMPDIR/root/MANJARO-ARM-IMAGE-BUILD + + # Make this symlink available, it's created by systemd on a running system + mkdir -p $TMPDIR/root/etc + ln -sf ../usr/lib/os-release $TMPDIR/root/etc/os-release + + info "Setting up keyrings..." $NSPAWN $TMPDIR/root pacman-key --init 1> /dev/null 2>&1 $NSPAWN $TMPDIR/root pacman-key --populate archlinuxarm manjaro manjaro-arm 1> /dev/null 2>&1 @@ -269,16 +278,18 @@ create_install() { info "Cleaning install for unwanted files..." umount $TMPDIR/root/var/cache/pacman/pkg - rm -rf $TMPDIR/root/usr/bin/qemu-aarch64-static - rm -rf $TMPDIR/root/var/cache/pacman/pkg/* - rm -rf $TMPDIR/root/var/log/* - rm -rf $TMPDIR/root/etc/*.pacnew - rm -rf $TMPDIR/root/usr/lib/systemd/system/systemd-firstboot.service - rm -rf $TMPDIR/root/etc/machine-id + rm -f $TMPDIR/root/usr/bin/qemu-aarch64-static + rm -f $ROOTFS_IMG/rootfs_$ARCH/MANJARO-ARM-IMAGE-BUILD + rm -f $TMPDIR/root/var/cache/pacman/pkg/* + rm -f $TMPDIR/root/var/log/* + rm -rf $ROOTFS_IMG/rootfs_$ARCH/var/log/journal/* + rm -f $TMPDIR/root/etc/*.pacnew + rm -f $TMPDIR/root/usr/lib/systemd/system/systemd-firstboot.service + rm -f $TMPDIR/root/etc/machine-id # Remove temp files on host - rm -rf $TMPDIR/user $TMPDIR/password $TMPDIR/rootpassword - rm -rf $TMPDIR/Manjaro-ARM-$ARCH-latest.tar.gz* + rm -f $TMPDIR/user $TMPDIR/password $TMPDIR/rootpassword + rm -f $TMPDIR/Manjaro-ARM-$ARCH-latest.tar.gz* msg "$DEVICE $EDITION install complete" }