Table of Contents
Specifies the line which should be absent or present
Must be present, if state is present. Must not be combined with regex, if state is absent.
If state is present, search for this pattern and add given line, if the given regular expression does not match.
In case of absent, ensure all lines matching the regular expression are absent (cannot be combined with the line parameter, if state is absent).
If the regular expression contains / (slashes), they need to be escaped with \ (backslash): / becomes \/.
# Manage the DAEMONS line in rc.conf __line daemons --file /etc/rc.conf --line 'DAEMONS=(hwclock !network sshd crond postfix)' # Ensure the home mount is present in /etc/fstab - explicitly make it present __line home-fstab \ --file /etc/fstab \ --line 'filer.fs:/vol/home /home nfs defaults 0 0' \ --state present # Removes the line specifiend in "include_www" from the file "lighttpd.conf" __line legacy_timezone --file /etc/rc.conf --regex 'TIMEZONE=.*' --state absent