Bug 1160091 - kickstart %post scriptlet has invalid syntax if custom snippet is empty
Summary: kickstart %post scriptlet has invalid syntax if custom snippet is empty
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 0.18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 19.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-04 02:32 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-25 07:18:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2014-11-04 02:32:17 UTC
Description of problem:
If the admin has a custom 'readahead_sysconfig' snippet which is empty (because they want to avoid Beaker's default readahead fiddling in their environment), as of Beaker 0.18 this will result in invalid syntax in the kickstart %post.

Release number of selected component (if applicable):
0.18.2

How reproducible:
with admin access

Steps to Reproduce:
1. Create empty file /etc/beaker/snippets/readahead_sysconfig
2. Run a job

Actual results:
Kickstart %post contains:

if [ -f /etc/sysconfig/readahead ] ; then
fi

which is a syntax error, so %post script does not work properly.

Expected results:
No syntax error, statement should have no effect if the snippet is empty.

Additional info:
Some other snippets suffer the same problem, need to audit to find which ones.

Thanks to Jun'ichi Nomura for the original report: http://article.gmane.org/gmane.comp.systems.beaker.devel/1118

Comment 1 Dan Callaghan 2014-11-04 02:34:49 UTC
virt_console_post is the only other problematic one.

Comment 2 Dan Callaghan 2014-11-04 02:44:31 UTC
http://gerrit.beaker-project.org/3458

Comment 5 Dan Callaghan 2014-11-11 03:56:50 UTC
We are not planning to do any more maintenance releases for the 0.18.x series, the next release will be 19.0.

Comment 6 Dan Callaghan 2014-11-25 07:18:19 UTC
Beaker 19.0 has been released.


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