commit:     e1eb62b46fbb1e2e62c46035b86c039e25426e4d
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 12 15:12:41 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 15:12:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e1eb62b4

Really run the controller run_local for di-stage2

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/targets/diskimage_stage2.py   |  3 +++
 targets/diskimage-stage2/controller.sh | 10 +++++-----
 targets/support/qcow2-install-grub.sh  |  5 -----
 targets/support/qcow2-installation.sh  |  9 +++++++++
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/catalyst/targets/diskimage_stage2.py 
b/catalyst/targets/diskimage_stage2.py
index 2ea267f7..154b36c5 100644
--- a/catalyst/targets/diskimage_stage2.py
+++ b/catalyst/targets/diskimage_stage2.py
@@ -71,6 +71,9 @@ class diskimage_stage2(StageBase):
         clear_dir(self.settings['target_path'])
 
     def run_local(self):
+       # let's first start with the controller file
+       StageBase.run_local(self)
+
         # what modules do we want to blacklist?
         if "diskimage/modblacklist" in self.settings:
             path = normpath(self.settings["chroot_path"] +

diff --git a/targets/diskimage-stage2/controller.sh 
b/targets/diskimage-stage2/controller.sh
index b676023d..5dac4cc9 100755
--- a/targets/diskimage-stage2/controller.sh
+++ b/targets/diskimage-stage2/controller.sh
@@ -3,6 +3,11 @@
 source ${clst_shdir}/support/functions.sh
 
 case $1 in
+        run)
+               # We need to install grub's EFI files and do very basic 
configuration
+               exec_in_chroot "${clst_shdir}/support/qcow2-installation.sh" || 
exit 1
+               ;;
+
        pre-kmerge)
                # Sets up the build environment before any kernels are compiled
                exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
@@ -24,10 +29,6 @@ case $1 in
                # Install dracut
                exec_in_chroot ${clst_shdir}/support/pre-distkmerge.sh
                ;;
-        run)
-               # We need to install grub's EFI files
-               exec_in_chroot "${clst_shdir}/support/qcow2-install-grub.sh"
-               ;;
        preclean)
                ;;
 
@@ -39,7 +40,6 @@ case $1 in
        rc-update)
                exec_in_chroot ${clst_shdir}/support/rc-update.sh
                ;;
-
        fsscript)
                exec_in_chroot ${clst_fsscript}
                ;;

diff --git a/targets/support/qcow2-install-grub.sh 
b/targets/support/qcow2-install-grub.sh
deleted file mode 100755
index 75d98768..00000000
--- a/targets/support/qcow2-install-grub.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-source /tmp/chroot-functions.sh
-
-grub-install --verbose --no-floppy --efi-directory=/boot --removable 
--skip-fs-probe --no-nvram --no-bootsector --target=x86_64-efi || die 
"grub-install failed"

diff --git a/targets/support/qcow2-installation.sh 
b/targets/support/qcow2-installation.sh
new file mode 100755
index 00000000..68dd781b
--- /dev/null
+++ b/targets/support/qcow2-installation.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+source /tmp/chroot-functions.sh
+
+# basic system setup
+
+# now we install grub into the future EFI partition
+grub-install --verbose --no-floppy --efi-directory=/boot --removable 
--skip-fs-probe \
+       --no-nvram --no-bootsector --target=x86_64-efi || die "grub-install 
failed"

Reply via email to