From 8a30f89360991a7680a5549e9cf6d332f8a95773 Mon Sep 17 00:00:00 2001 From: Christoph Johannes Kleine <linux@cj-k.de> Date: Sun, 3 Nov 2019 23:24:29 +0100 Subject: [PATCH] =?UTF-8?q?bootlocal.sh=20und=20installer.sh=20lauff=C3=A4?= =?UTF-8?q?hig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/bootlocal.sh | 19 ++++++++++++------- files/installer.sh | 23 ++++++++++++++++++++--- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/files/bootlocal.sh b/files/bootlocal.sh index 10c44f4..eb3918c 100644 --- a/files/bootlocal.sh +++ b/files/bootlocal.sh @@ -27,7 +27,8 @@ chmod 755 / installTcPackages bash parted bc ntfs-3g dosfstools # workaround for limited availability of btrfs-progs and reiserfsprogs -if [ uname -m -eq x86_64 ] +architecture=$(uname -m) +if [ "${architecture}" == "x86_64" ] then installTcPackages btrfs-progs else installTcPackages reiserfsprogs fi @@ -36,11 +37,13 @@ fi installTcPackages kmaps util-linux loadkmap </usr/share/kmap/qwertz/de-latin1-nodeadkeys.kmap +echo "create target directory" mkdir /target chmod 0755 /target -# include install.sh -. ./installer.sh | tee >> /tmp/installer.logfile +# run install.sh +echo "switch to bash and run installer" +bash ./installer.sh | tee >> /tmp/installer.logfile mkdir -p /target/etc/ssh/ chmod 0755 /target/etc/ssh/ @@ -50,8 +53,10 @@ cp /opt/ansible.pub /target/etc/ssh/authorized_keys chmod 0644 /target/etc/ssh/authorized_keys chown 0:0 /target/etc/ssh/authorized_keys -cp /tmp/fstab /etc/fstab -chmod 0644 /etc/fstab -chown 0:0 /etc/fstab +cp /tmp/fstab.target /target/etc/fstab +chmod 0644 /target/etc/fstab +chown 0:0 /target/etc/fstab -echo "installer finished" +sync + +echo "installer finished, logfile: /tmp/installer.logfile" diff --git a/files/installer.sh b/files/installer.sh index e9d6341..0ec2c60 100755 --- a/files/installer.sh +++ b/files/installer.sh @@ -3,13 +3,30 @@ # include functions.sh again, thins it is a new environment . ./functions.sh -# include diskpreperation.sh -. ./diskpreperation.sh +# include diskspreparation.sh +echo "run disks preparation" +. ./diskspreparation.sh +echo "run disks preparation finished" + +# append local fstab, possible problems with outomount included in tinycore +cat /tmp/fstab.local >> /etc/fstab + +# inform kernel about changes +sync +sleep 2 +partprobe +sleep 2 + +# mount all unmounted file systems +mount -a +echo "mounting file systems" # include runinstaller.sh if it exists if [ -f runinstaller.sh ] + then + echo "run installer" . ./runinstaller.sh + echo "run installer finished" else echo "file runinstaller.sh not found" fi - -- GitLab