From f079b85b4b91721e31c52431c254b6e709ae3d4d Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Tue, 13 Feb 2018 03:20:45 +0200 Subject: [PATCH] actually mount the media in installer & use it --- Makefile | 5 +++-- build_iso.sh | 5 +---- kayak-menu.sh | 3 +++ rpool-install.sh | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 0dce323..8cfa1aa 100644 --- a/Makefile +++ b/Makefile @@ -130,8 +130,9 @@ mount_media: src/mount_media.c gcc -o $@ $< -ldevinfo install-iso: $(BUILDSEND_MP)/$(VERSION).iso -$(BUILDSEND_MP)/$(VERSION).iso: takeover-console $(BUILDSEND_MP)/miniroot.gz $(BUILDSEND_MP)/kayak_$(VERSION).zfs.bz2 +$(BUILDSEND_MP)/$(VERSION).iso: takeover-console mount_media $(BUILDSEND_MP)/miniroot.gz $(BUILDSEND_MP)/kayak_$(VERSION).zfs.bz2 BUILDSEND_MP=$(BUILDSEND_MP) VERSION=$(VERSION) ./build_iso.sh -install-usb: $(BUILDSEND_MP)/$(VERSION).iso +install-usb: $(BUILDSEND_MP)/$(VERSION).img +$(BUILDSEND_MP)/$(VERSION).img: $(BUILDSEND_MP)/$(VERSION).iso ./usbgen.sh $(BUILDSEND_MP)/$(VERSION).iso $(BUILDSEND_MP)/$(VERSION).img /tmp diff --git a/build_iso.sh b/build_iso.sh index f79c7bb..54cc3d5 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -118,10 +118,7 @@ echo $VERSION > $ISO_ROOT/.volsetid stage "Adding extra files to miniroot" # Extra files -cp -p \ - takeover-console \ - mount_media \ - $MNT/kayak/. +cp takeover-console mount_media $MNT/kayak/ if [ -n "$REFRESH_KAYAK" ]; then # For testing, make sure files in miniroot are current diff --git a/kayak-menu.sh b/kayak-menu.sh index 3bc7d1d..c4f7ec7 100755 --- a/kayak-menu.sh +++ b/kayak-menu.sh @@ -42,6 +42,9 @@ if [[ -z "$ROOT_SHELL" ]]; then ROOT_SHELL="/usr/bin/sh" fi +mkdir /.cdrom +/kayak/mount_media $(awk '{print $2}' /etc/release) + # Get the user's keyboard choice out of the way now. /usr/bin/kbd -s /usr/bin/loadkeys diff --git a/rpool-install.sh b/rpool-install.sh index b7fda2c..915830f 100644 --- a/rpool-install.sh +++ b/rpool-install.sh @@ -16,7 +16,7 @@ # RPOOL=${1:-rpool} -ZFS_IMAGE=/root/*.zfs.bz2 +ZFS_IMAGE=/.cdrom/image/*.zfs.bz2 keyboard_layout=${2:-US-English} zpool list $RPOOL >& /dev/null -- 2.11.4.GIT