Created
November 20, 2015 16:26
-
-
Save asasfu/64a86a50485656b0b61f to your computer and use it in GitHub Desktop.
Fix for augeasproviders_pam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def in_position? | |
unless resource[:position].nil? | |
path, before = self.class.position_path(resource[:position], resource[:type]) | |
mpath = "#{resource_path}[preceding-sibling::#{path}]" | |
augopen do |aug| | |
augmatch = aug.match(mpath).empty? | |
augmatch = before == 'before' ? augmatch : !augmatch | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment