Skip to content

Add conditionality to config file locations in lenses #16

@thejoecarroll

Description

@thejoecarroll

I'd like to see the included lens descriptions check what OS Augeas is running on and then choose the appropriate location. For example, "out of the box" Augeas will not process sshd_config on Mac OS X because it is not located at the same path as on Ubuntu. It is necesary to edit .../share/augeas/lenses/dist/sshd.aug so that the line
let xfm = transform lns (incl "/etc/ssh/sshd_config")
becomes:
let xfm = transform lns (incl "/etc/sshd_config")
I'm not really familiar with ML and only just discovered Augeas and haven't read up too much yet on the lens DSL (so pardon me if this is already possible), but it seems like adding some sort of environment variable that a lens can check along with support for conditional structures along the lines of switch/case statements in other languages would do the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions