Hi,
In beaker 0.18, "rhts_post" snippet has a following construct:
if [ -f /etc/sysconfig/readahead ] ; then {% snippet 'readahead_sysconfig' %} fi
This is error-prone because if we have site-local "readahead_sysconfig" snippet, which is empty, generated shell script will be broken. (Actually, I've been using empty "readahead_sysconfig" snippet)
So it might be better to move if/then/fi into the snippet like below.
Same might apply to "virt_console_post".
--- Jun'ichi Nomura, NEC Corporation
diff --git a/Server/bkr/server/snippets/readahead_sysconfig b/Server/bkr/server/snippets/readahead_sysconfig index 830f20b..393c215 100644 --- a/Server/bkr/server/snippets/readahead_sysconfig +++ b/Server/bkr/server/snippets/readahead_sysconfig @@ -1,3 +1,4 @@ +if [ -f /etc/sysconfig/readahead ] ; then cat >>/etc/sysconfig/readahead <<EOF
# readahead conflicts with auditd, see bug 561486 for detailed explanation. @@ -8,3 +9,4 @@ READAHEAD_COLLECT="no" READAHEAD_COLLECT_ON_RPM="no" EOF +fi diff --git a/Server/bkr/server/snippets/rhts_post b/Server/bkr/server/snippets/rhts_post index bce2347..1635406 100644 --- a/Server/bkr/server/snippets/rhts_post +++ b/Server/bkr/server/snippets/rhts_post @@ -15,9 +15,7 @@ fi
# Enable post-install boot notification {% snippet 'post_anamon' %} -if [ -f /etc/sysconfig/readahead ] ; then {% snippet 'readahead_sysconfig' %} -fi {% snippet 'linkdelay' %}
{# We normally want to make sure the system time is accurate, in case