1 #!/bin/sed -rf
2 /^#\tldap/ {
3 s/^#\tldap$/\tldap/
4 }
5
6 /Auth-Type LDAP/ {
7 N
8 N
9 s/^#?(\s*)Auth-Type LDAP \{\
10 #?(\s*)ldap\
11 #?(\s*)\}/\1Auth-Type LDAP \{\
12 \2ldap\
13 \3\}/
14 }