~charm-helpers/charm-helpers/devel

Viewing all changes in revision 788.

  • Committer: Alex Kavanagh
  • Date: 2017-08-31 12:22:38 UTC
  • mfrom: (784.2.2 lp1712203)
  • Revision ID: alex.kavanagh@canonical.com-20170831122238-9gj59crce98kznhx
[shaner,r=ajkavanagh] Fixes parsing of currently loaded apache modules

When hardening apache, the returned list of currently
enabled modules is always empty.

This change splits on linefeeds from the output of
'apachectl -M' instead of spaces which allows the
regex to match.

Since the returned list of modules could potentitialy
be used as input to '_disable_module' the regex was tweaked
to truncate the module name, removing the '_module' since
this is what a2dismod expects.

Closes-Bug: #1712203

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: