diff --git a/examples/scripts/tar_generic_inner_chroot_script_after.sh b/examples/scripts/tar_generic_inner_chroot_script_after.sh new file mode 100644 index 0000000..15ae783 --- /dev/null +++ b/examples/scripts/tar_generic_inner_chroot_script_after.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/sbin/env-update && source /etc/profile + +# Generate list of installed packages +equo query list installed -qv > /etc/sabayon-pkglist diff --git a/examples/specs/sabayon/spinbase-openvz-template.common b/examples/specs/sabayon/spinbase-openvz-template.common index fc247c7..476d6cd 100644 --- a/examples/specs/sabayon/spinbase-openvz-template.common +++ b/examples/specs/sabayon/spinbase-openvz-template.common @@ -17,6 +17,10 @@ execution_strategy: iso_to_tar # - kmerge.sh - setup kernel bins # inner_chroot_script: /sabayon/scripts/openvz_inner_chroot_script.sh +# Inner chroot script command, to be executed inside destination chroot after +# packages installation and removal +inner_chroot_script_after: /sabayon/scripts/tar_generic_inner_chroot_script_after.sh + # Outer chroot script command, to be executed outside destination chroot before # before entering it (and AFTER inner_chroot_script) # outer_chroot_script_after: /path/to/script/to/be/executed/outside/after diff --git a/molecule/specs/plugins/tar_plugin.py b/molecule/specs/plugins/tar_plugin.py index 41d0522..5e38a52 100644 --- a/molecule/specs/plugins/tar_plugin.py +++ b/molecule/specs/plugins/tar_plugin.py @@ -170,6 +170,10 @@ class IsoToTarSpec(GenericSpec): 'cb': self.valid_path_string_first_list_item, 've': self.ve_string_splitter, }, + 'inner_chroot_script_after': { + 'cb': self.valid_path_string_first_list_item, + 've': self.ve_string_splitter, + }, 'outer_chroot_script_after': { 'cb': self.valid_exec_first_list_item, 've': self.ve_string_splitter,