/
usr
/
share
/
augeas
/
lenses
/
dist
/
/usr/share/augeas/lenses/dist
mkdir
upload
Name
Size
Mode
Actions
tests/
-
0755
rm
access.aug
3669
0644
edit
dl
rm
activemq_conf.aug
1509
0644
edit
dl
rm
activemq_xml.aug
864
0644
edit
dl
rm
afs_cellalias.aug
1602
0644
edit
dl
rm
aliases.aug
2231
0644
edit
dl
rm
anaconda.aug
775
0644
edit
dl
rm
anacron.aug
2545
0644
edit
dl
rm
approx.aug
1286
0644
edit
dl
rm
aptcacherngsecurity.aug
726
0644
edit
dl
rm
aptconf.aug
3989
0644
edit
dl
rm
aptpreferences.aug
1831
0644
edit
dl
rm
aptsources.aug
2023
0644
edit
dl
rm
apt_update_manager.aug
1135
0644
edit
dl
rm
authinfo2.aug
1476
0644
edit
dl
rm
authorized_keys.aug
1883
0644
edit
dl
rm
authselectpam.aug
3784
0644
edit
dl
rm
automaster.aug
3391
0644
edit
dl
rm
automounter.aug
4148
0644
edit
dl
rm
avahi.aug
1417
0644
edit
dl
rm
backuppchosts.aug
1014
0644
edit
dl
rm
bbhosts.aug
4342
0644
edit
dl
rm
bootconf.aug
3736
0644
edit
dl
rm
build.aug
17045
0644
edit
dl
rm
cachefilesd.aug
2051
0644
edit
dl
rm
carbon.aug
1574
0644
edit
dl
rm
ceph.aug
719
0644
edit
dl
rm
cgconfig.aug
3447
0644
edit
dl
rm
cgrules.aug
2432
0644
edit
dl
rm
channels.aug
3929
0644
edit
dl
rm
chrony.aug
13982
0644
edit
dl
rm
clamav.aug
1716
0644
edit
dl
rm
cmdline.aug
500
0644
edit
dl
rm
cobblermodules.aug
398
0644
edit
dl
rm
cobblersettings.aug
2295
0644
edit
dl
rm
collectd.aug
869
0644
edit
dl
rm
cpanel.aug
824
0644
edit
dl
rm
cron.aug
4143
0644
edit
dl
rm
cron_user.aug
1290
0644
edit
dl
rm
crypttab.aug
3151
0644
edit
dl
rm
csv.aug
1212
0644
edit
dl
rm
cups.aug
459
0644
edit
dl
rm
cyrus_imapd.aug
1546
0644
edit
dl
rm
darkice.aug
773
0644
edit
dl
rm
debctrl.aug
3701
0644
edit
dl
rm
desktop.aug
1422
0644
edit
dl
rm
devfsrules.aug
619
0644
edit
dl
rm
device_map.aug
620
0644
edit
dl
rm
dhclient.aug
6850
0644
edit
dl
rm
dhcpd.aug
21379
0644
edit
dl
rm
dnsmasq.aug
2209
0644
edit
dl
rm
dns_zone.aug
2963
0644
edit
dl
rm
dovecot.aug
4073
0644
edit
dl
rm
dpkg.aug
2851
0644
edit
dl
rm
dput.aug
2213
0644
edit
dl
rm
erlang.aug
4432
0644
edit
dl
rm
ethers.aug
663
0644
edit
dl
rm
exports.aug
2424
0644
edit
dl
rm
fail2ban.aug
1835
0644
edit
dl
rm
fai_diskconfig.aug
9502
0644
edit
dl
rm
fonts.aug
819
0644
edit
dl
rm
fstab.aug
1257
0644
edit
dl
rm
fuse.aug
871
0644
edit
dl
rm
gdm.aug
1841
0644
edit
dl
rm
getcap.aug
1610
0644
edit
dl
rm
group.aug
1703
0644
edit
dl
rm
grub.aug
11311
0644
edit
dl
rm
grubenv.aug
508
0644
edit
dl
rm
gshadow.aug
2240
0644
edit
dl
rm
gtkbookmarks.aug
855
0644
edit
dl
rm
hostname.aug
435
0644
edit
dl
rm
hosts.aug
485
0644
edit
dl
rm
hosts_access.aug
4426
0644
edit
dl
rm
host_conf.aug
1941
0644
edit
dl
rm
htpasswd.aug
1043
0644
edit
dl
rm
httpd.aug
7527
0644
edit
dl
rm
inetd.aug
6365
0644
edit
dl
rm
inifile.aug
15859
0644
edit
dl
rm
inittab.aug
780
0644
edit
dl
rm
inputrc.aug
1662
0644
edit
dl
rm
interfaces.aug
4733
0644
edit
dl
rm
iproute2.aug
323
0644
edit
dl
rm
iptables.aug
2703
0644
edit
dl
rm
iscsid.aug
684
0644
edit
dl
rm
jaas.aug
1612
0644
edit
dl
rm
jettyrealm.aug
1552
0644
edit
dl
rm
jmxaccess.aug
1386
0644
edit
dl
rm
jmxpassword.aug
1375
0644
edit
dl
rm
json.aug
2198
0644
edit
dl
rm
kdump.aug
2977
0644
edit
dl
rm
keepalived.aug
10958
0644
edit
dl
rm
known_hosts.aug
1979
0644
edit
dl
rm
koji.aug
898
0644
edit
dl
rm
krb5.aug
7149
0644
edit
dl
rm
ldif.aug
7833
0644
edit
dl
rm
ldso.aug
1085
0644
edit
dl
rm
lightdm.aug
1793
0644
edit
dl
rm
limits.aug
2066
0644
edit
dl
rm
login_defs.aug
615
0644
edit
dl
rm
logrotate.aug
4333
0644
edit
dl
rm
logwatch.aug
1473
0644
edit
dl
rm
lokkit.aug
2216
0644
edit
dl
rm
lvm.aug
2079
0644
edit
dl
rm
mailscanner.aug
1699
0644
edit
dl
rm
mailscanner_rules.aug
2911
0644
edit
dl
rm
masterpasswd.aug
4468
0644
edit
dl
rm
mcollective.aug
1112
0644
edit
dl
rm
mdadm_conf.aug
10289
0644
edit
dl
rm
memcached.aug
1272
0644
edit
dl
rm
mke2fs.aug
6436
0644
edit
dl
rm
modprobe.aug
3420
0644
edit
dl
rm
modules.aug
741
0644
edit
dl
rm
modules_conf.aug
1068
0644
edit
dl
rm
mongodbserver.aug
1201
0644
edit
dl
rm
monit.aug
2182
0644
edit
dl
rm
multipath.aug
4311
0644
edit
dl
rm
mysql.aug
1994
0644
edit
dl
rm
nagioscfg.aug
2138
0644
edit
dl
rm
nagiosobjects.aug
1604
0644
edit
dl
rm
netmasks.aug
1732
0644
edit
dl
rm
networkmanager.aug
2233
0644
edit
dl
rm
networks.aug
1116
0644
edit
dl
rm
nginx.aug
3740
0644
edit
dl
rm
nrpe.aug
1827
0644
edit
dl
rm
nslcd.aug
10111
0644
edit
dl
rm
nsswitch.aug
2386
0644
edit
dl
rm
ntp.aug
5419
0644
edit
dl
rm
ntpd.aug
4861
0644
edit
dl
rm
odbc.aug
1450
0644
edit
dl
rm
opendkim.aug
3174
0644
edit
dl
rm
openshift_config.aug
2524
0644
edit
dl
rm
openshift_http.aug
1052
0644
edit
dl
rm
openshift_quickstarts.aug
1044
0644
edit
dl
rm
openvpn.aug
22817
0644
edit
dl
rm
oz.aug
1384
0644
edit
dl
rm
pagekite.aug
2663
0644
edit
dl
rm
pam.aug
2637
0644
edit
dl
rm
pamconf.aug
1256
0644
edit
dl
rm
passwd.aug
3609
0644
edit
dl
rm
pbuilder.aug
638
0644
edit
dl
rm
pgbouncer.aug
1462
0644
edit
dl
rm
pg_hba.aug
3043
0644
edit
dl
rm
php.aug
2393
0644
edit
dl
rm
phpvars.aug
3947
0644
edit
dl
rm
postfix_access.aug
771
0644
edit
dl
rm
postfix_main.aug
1555
0644
edit
dl
rm
postfix_master.aug
1950
0644
edit
dl
rm
postfix_passwordmap.aug
1312
0644
edit
dl
rm
postfix_sasl_smtpd.aug
697
0644
edit
dl
rm
postfix_transport.aug
1514
0644
edit
dl
rm
postfix_virtual.aug
1347
0644
edit
dl
rm
postgresql.aug
2152
0644
edit
dl
rm
properties.aug
2357
0644
edit
dl
rm
protocols.aug
1080
0644
edit
dl
rm
puppet.aug
1558
0644
edit
dl
rm
puppetfile.aug
2327
0644
edit
dl
rm
puppetfileserver.aug
3190
0644
edit
dl
rm
puppet_auth.aug
2001
0644
edit
dl
rm
pylonspaste.aug
2359
0644
edit
dl
rm
pythonpaste.aug
2035
0644
edit
dl
rm
qpid.aug
670
0644
edit
dl
rm
quote.aug
6871
0644
edit
dl
rm
rabbitmq.aug
4804
0644
edit
dl
rm
radicale.aug
1518
0644
edit
dl
rm
rancid.aug
927
0644
edit
dl
rm
redis.aug
6439
0644
edit
dl
rm
reprepro_uploaders.aug
5604
0644
edit
dl
rm
resolv.aug
4082
0644
edit
dl
rm
rhsm.aug
1130
0644
edit
dl
rm
rmt.aug
788
0644
edit
dl
rm
rsyncd.aug
2017
0644
edit
dl
rm
rsyslog.aug
3344
0644
edit
dl
rm
rtadvd.aug
854
0644
edit
dl
rm
rx.aug
4303
0644
edit
dl
rm
samba.aug
1755
0644
edit
dl
rm
schroot.aug
1832
0644
edit
dl
rm
securetty.aug
450
0644
edit
dl
rm
semanage.aug
859
0644
edit
dl
rm
sep.aug
1306
0644
edit
dl
rm
services.aug
2887
0644
edit
dl
rm
shadow.aug
2404
0644
edit
dl
rm
shells.aug
745
0644
edit
dl
rm
shellvars.aug
12311
0644
edit
dl
rm
shellvars_list.aug
1779
0644
edit
dl
rm
simplelines.aug
1155
0644
edit
dl
rm
simplevars.aug
1438
0644
edit
dl
rm
sip_conf.aug
1651
0644
edit
dl
rm
slapd.aug
5327
0644
edit
dl
rm
smbusers.aug
781
0644
edit
dl
rm
solaris_system.aug
3228
0644
edit
dl
rm
soma.aug
1167
0644
edit
dl
rm
spacevars.aug
1449
0644
edit
dl
rm
splunk.aug
1677
0644
edit
dl
rm
squid.aug
16330
0644
edit
dl
rm
ssh.aug
4493
0644
edit
dl
rm
sshd.aug
4248
0644
edit
dl
rm
sssd.aug
861
0644
edit
dl
rm
star.aug
941
0644
edit
dl
rm
strongswan.aug
1671
0644
edit
dl
rm
stunnel.aug
2260
0644
edit
dl
rm
subversion.aug
2817
0644
edit
dl
rm
sudoers.aug
20557
0644
edit
dl
rm
sysconfig.aug
2550
0644
edit
dl
rm
sysconfig_route.aug
2615
0644
edit
dl
rm
sysctl.aug
923
0644
edit
dl
rm
syslog.aug
7501
0644
edit
dl
rm
systemd.aug
6154
0644
edit
dl
rm
termcap.aug
1050
0644
edit
dl
rm
thttpd.aug
1345
0644
edit
dl
rm
tinc.aug
1103
0644
edit
dl
rm
tmpfiles.aug
3157
0644
edit
dl
rm
toml.aug
4175
0644
edit
dl
rm
trapperkeeper.aug
4110
0644
edit
dl
rm
tuned.aug
387
0644
edit
dl
rm
up2date.aug
2264
0644
edit
dl
rm
updatedb.aug
1159
0644
edit
dl
rm
util.aug
4963
0644
edit
dl
rm
vfstab.aug
1756
0644
edit
dl
rm
vmware_config.aug
702
0644
edit
dl
rm
vsftpd.aug
2785
0644
edit
dl
rm
webmin.aug
1257
0644
edit
dl
rm
wine.aug
1966
0644
edit
dl
rm
xendconfsxp.aug
1097
0644
edit
dl
rm
xinetd.aug
4120
0644
edit
dl
rm
xml.aug
6481
0644
edit
dl
rm
xorg.aug
10679
0644
edit
dl
rm
xymon.aug
2314
0644
edit
dl
rm
xymon_alerting.aug
6259
0644
edit
dl
rm
yaml.aug
1581
0644
edit
dl
rm
yum.aug
2240
0644
edit
dl
rm
Edit:
/usr/share/augeas/lenses/dist/mdadm_conf.aug
(10289B)
(****************************************************************************** Mdadm_conf module for Augeas Author: Matthew Booth <mbooth@redhat.com> Copyright (C): 2011 Red Hat Inc. Reference: mdadm(5) config.c and policy.c from mdadm-3.2.2 License: This file is licensed under the LGPL v2+. This is a lens for /etc/mdadm.conf. It aims to parse every valid configuration file as of version 3.2.2, and many invalid ones too. This last point is a feature, not a bug! madm will generate warnings for invalid configuration which do not prevent correct operation of the tool. Wherever possible, we try to allow for this behaviour. Keywords in mdadm.conf are matched with a case-insensitive prefix match of at least 3 characters. Keys in key/value pairs are also matched case-insensitively, but require a full match. The exception is POLICY and PART-POLICY, where keys are matched case-sensitively. N.B. We can't use case-insensitive regular expressions in most places due to bug #147. *******************************************************************************) module Mdadm_conf = autoload xfm (****************************************************************************** * PRIMITIVES ******************************************************************************) let eol = Util.comment_or_eol let comment = Util.comment let empty = Util.empty let value = /[^ \t\n#]+/ let value_no_eq = /[^ \t\n#=]+/ let value_no_eq_sl = /[^ \t\n#=\/]+/ let continuation = /\n[ \t]+/ let space = /[ \t]+/ let value_sep = ( del ( continuation | space . continuation? ) " " | comment . del space " " ) (* We parse specific keys rather than having a catch-all owing to the varying case of the syntax. This means the user can rely on 'array/uuid' rather than additionally testing for 'array/UUID'. It would be good to have an additional catchall, but I haven't been able to make that work. *) let keyvalue (r:regexp) (lc:string) (uc:string) = [ del ( r . /=/ ) ( uc . "=" ) . label lc . store value ] let simplevalue (r:regexp) (lc:string) (uc:string) = [ del r uc . label lc . ( value_sep . [ label "value" . store value ] )* . eol ] (****************************************************************************** * DEVICES ******************************************************************************) let dev_re = /dev(i(ce?)?)?/i let dev_containers_re = /containers/i let dev_partitions_re = /partitions/i let dev_containers = [ del dev_containers_re "containers" . label "containers" ] let dev_partitions = [ del dev_partitions_re "partitions" . label "partitions" ] let dev_device = [ label "name". store ( value - (dev_containers_re | dev_partitions_re)) ] (* Strictly there must be at least 1 device, but we err on the side of parsing *) let dev_devices = ( value_sep . ( dev_containers | dev_partitions | dev_device ) )* let device = [ del dev_re "DEVICE" . label "device" . dev_devices . eol ] (****************************************************************************** * ARRAY ******************************************************************************) let array_re = /arr(ay?)?/i let arr_auto_re = /auto/i let arr_bitmap_re = /bitmap/i let arr_container_re = /container/i let arr_devices_re = /devices/i let arr_disks_re = /disks/i (* Undocumented *) let arr_level_re = /level/i let arr_member_re = /member/i let arr_metadata_re = /metadata/i let arr_name_re = /name/i let arr_num_devices_re = /num-devices/i let arr_spare_group_re = /spare-group/i let arr_spares_re = /spares/i let arr_super_minor_re = /super-minor/i let arr_uuid_re = /uuid/i let arr_devicename = [ store value_no_eq . label "devicename" ] let arr_auto = keyvalue arr_auto_re "auto" "AUTO" let arr_bitmap = keyvalue arr_bitmap_re "bitmap" "BITMAP" let arr_container = keyvalue arr_container_re "container" "CONTAINER" let arr_devices = keyvalue arr_devices_re "devices" "DEVICES" let arr_disks = keyvalue arr_disks_re "disks" "DISKS" let arr_level = keyvalue arr_level_re "level" "LEVEL" let arr_member = keyvalue arr_member_re "member" "MEMBER" let arr_metadata = keyvalue arr_metadata_re "metadata" "METADATA" let arr_name = keyvalue arr_name_re "name" "NAME" let arr_num_devices = keyvalue arr_num_devices_re "num-devices" "NUM-DEVICES" let arr_spare_group = keyvalue arr_spare_group_re "spare-group" "SPARE-GROUP" let arr_spares = keyvalue arr_spares_re "spares" "SPARES" let arr_super_minor = keyvalue arr_super_minor_re "super-minor" "SUPER-MINOR" let arr_uuid = keyvalue arr_uuid_re "uuid" "UUID" let arr_options = ( value_sep . ( arr_devicename | arr_auto | arr_bitmap | arr_container | arr_devices | arr_disks | arr_level | arr_member | arr_metadata | arr_name | arr_num_devices | arr_spare_group | arr_spares | arr_super_minor | arr_uuid ) )* let array = [ del array_re "ARRAY" . label "array" . arr_options . eol ] (****************************************************************************** * MAILADDR ******************************************************************************) let mailaddr_re = /mai(l(a(d(dr?)?)?)?)?/i (* We intentionally allow multiple mailaddr values here, even though this is invalid and would produce a warning. This is better than not parsing the file. *) let mailaddr = simplevalue mailaddr_re "mailaddr" "MAILADDR" (****************************************************************************** * MAILFROM ******************************************************************************) (* N.B. MAILFROM can only be abbreviated to 5 characters *) let mailfrom_re = /mailf(r(om?)?)?/i let mailfrom = [ del mailfrom_re "MAILFROM" . label "mailfrom" . ( value_sep . [ label "value" . store value ] )* . eol ] (****************************************************************************** * PROGRAM ******************************************************************************) let program_re = /pro(g(r(am?)?)?)?/i let program = simplevalue program_re "program" "PROGRAM" (****************************************************************************** * CREATE ******************************************************************************) let create_re = /cre(a(te?)?)?/i let cre_auto_re = /auto/i let cre_owner_re = /owner/i let cre_group_re = /group/i let cre_mode_re = /mode/i let cre_metadata_re = /metadata/i let cre_symlinks_re = /symlinks/i let cre_auto = keyvalue cre_auto_re "auto" "AUTO" let cre_group = keyvalue cre_group_re "group" "GROUP" let cre_metadata = keyvalue cre_metadata_re "metadata" "METADATA" let cre_mode = keyvalue cre_mode_re "mode" "MODE" let cre_owner = keyvalue cre_owner_re "owner" "OWNER" let cre_symlinks = keyvalue cre_symlinks_re "symlinks" "SYMLINKS" let cre_options = ( value_sep . ( arr_auto | cre_owner | cre_group | cre_mode | cre_metadata | cre_symlinks) )* let create = [ del create_re "CREATE" . label "create" . cre_options . eol ] (****************************************************************************** * HOMEHOST ******************************************************************************) let homehost_re = /hom(e(h(o(st?)?)?)?)?/i let homehost = simplevalue homehost_re "homehost" "HOMEHOST" (****************************************************************************** * AUTO ******************************************************************************) let auto_re = /auto?/i let aut_plus = [ key "+" . store value ] let aut_minus = [ key "-" . store value ] let aut_homehost = [ del /homehost/i "homehost" . label "homehost" ] let aut_list = ( value_sep . ( aut_plus | aut_minus | aut_homehost ) )* let auto = [ del auto_re "AUTO" . label "auto" . aut_list . eol ] (****************************************************************************** * POLICY and PART-POLICY ******************************************************************************) (* PART-POLICY is undocumented. A cursory inspection of the parsing code suggests it's parsed the same way as POLICY, but treated slightly differently thereafter. *) let policy_re = /pol(i(cy?)?)?/i let part_policy_re = /par(t(-(p(o(l(i(cy?)?)?)?)?)?)?)?/i (* Unlike everything else, policy keys are matched case sensitive. This means we don't have to mess around with explicit option matching, as the match string is fixed for a working configuration. *) let pol_option (act:string) = [ del ( act . "=" ) ( act . "=" ) . label act . store value ] let pol_options = ( value_sep . [ key value_no_eq_sl . del "=" "=" . store value ] )* let policy = [ del policy_re "POLICY" . label "policy" . pol_options . eol ] let part_policy = [ del part_policy_re "PART-POLICY" . label "part-policy" . pol_options . eol ] (****************************************************************************** * LENS ******************************************************************************) let lns = (comment | empty | device | array | mailaddr | mailfrom | program | create | homehost | auto | policy | part_policy )* let filter = incl "/etc/mdadm.conf" . incl "/etc/mdadm/mdadm.conf" let xfm = transform lns filter
Save
cmd:
run