Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1417676 - RFE: extend anaconda install class API to allow executing some hooks before & after %pre & %post kickstart scriptlets
Summary: RFE: extend anaconda install class API to allow executing some hooks before &...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-30 15:59 UTC by Vit Ry
Modified: 2017-05-04 12:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-05-04 12:57:32 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Vit Ry 2017-01-30 15:59:36 UTC
Description of problem:

When customizing anaconda, it is useful to add custom commands before/after installation. The only way currently (El7/F25) - it is using `product/usr/share/anaconda/interactive-defaults.ks`. But it wouldn't be executed if user specify custom kickstart.

In rhel6-branch's anaconda there is postAction() hook ( https://github.com/rhinstaller/anaconda/blob/ec5b0308dd0ff7e3051714100ef0ba8977aaa4ba/installclass.py#L80 ) which allows to fix/achieve it.

Logically it would be cool to up-port this feature to installclass. So, add 2 functions for %pre (before and after %pre section), and 2 functions for %post (before and after %post).

Version-Release number of selected component (if applicable):
anaconda- (or even rhel7-branch on github)

How reproducible:

Steps to Reproduce:
1. Put some customization in %post section of interactive-defaults.ks of product.img
2. Create custom iso
3. Boot installer with different kickstart

1. Try to customize anaconda to surely add some scripts to run after installation.

Actual results:
* %post in interactive-defaults.ks wouldn't be executed
* there is no way to to surely add some scripts to run after installation

Expected results:
There is some API to surely add customizations's scripts before/after installation

Comment 2 Vit Ry 2017-02-08 16:13:39 UTC
Easy hack - put your ks with %post section under /usr/share/anaconda/post-scripts/*ks

Comment 3 Samantha N. Bueno 2017-05-04 12:57:27 UTC
This would open up a whole new realm of possibilities for things to go exponentially wrong. Not only that, but issues that arise would be difficult to debug.

I'm pretty sure the functions from RHEL06 you pointed out were removed in the anaconda rewrite to reduce some of the support burden.

If there is a very good business justification to support adding this functionality back in, we can consider it.

As of now, however, I'll suggest looking into creating an addon: https://rhinstaller.github.io/anaconda-addon-development-guide/

Comment 4 Red Hat Bugzilla Rules Engine 2017-05-04 12:57:32 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.