summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-02-12 13:33:25 +0100
committerRob Crittenden <rcritten@redhat.com>2010-02-12 10:46:20 -0500
commitb31f259b1a24b5da8a8ed80d27b1f925220e8f24 (patch)
treeb7769f3897b29c6eba57735467c27ad2453573dc
parent85bb506d5b471aa6bdbf96be7c95bad244640595 (diff)
downloadfreeipa-b31f259b1a24b5da8a8ed80d27b1f925220e8f24.tar.gz
freeipa-b31f259b1a24b5da8a8ed80d27b1f925220e8f24.tar.xz
freeipa-b31f259b1a24b5da8a8ed80d27b1f925220e8f24.zip
Add default automount location. Auto-create auto.direct in new locations.
-rw-r--r--install/updates/30-automount.update16
-rw-r--r--ipalib/plugins/automount.py3
2 files changed, 13 insertions, 6 deletions
diff --git a/install/updates/30-automount.update b/install/updates/30-automount.update
index c89d583ae..93f29a0bb 100644
--- a/install/updates/30-automount.update
+++ b/install/updates/30-automount.update
@@ -4,15 +4,19 @@ dn: cn=automount,$SUFFIX
add:objectClass: nsContainer
add:cn: automount
-dn: automountmapname=auto.master,cn=automount,$SUFFIX
+dn: cn=default,cn=automount,$SUFFIX
+add:objectClass: nsContainer
+add:cn: automount
+
+dn: automountmapname=auto.master,cn=default,cn=automount,$SUFFIX
add:objectClass: automountMap
add:automountMapName: auto.master
-dn: automountkey=/-,automountmapname=auto.master,cn=automount,$SUFFIX
+dn: automountmapname=auto.direct,cn=default,cn=automount,$SUFFIX
+add:objectClass: automountMap
+add:automountMapName: auto.direct
+
+dn: automountkey=/-,automountmapname=auto.master,cn=default,cn=automount,$SUFFIX
add:objectClass: automount
add:automountKey: '/-'
add:automountInformation: auto.direct
-
-dn: automountmapname=auto.direct,cn=automount,$SUFFIX
-add:objectClass: automountMap
-add:automountMapName: auto.direct
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 051f6d05f..85b13293e 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -121,6 +121,9 @@ class automountlocation_add(LDAPCreate):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
# create auto.master for the new location
self.api.Command['automountmap_add'](keys[-1], u'auto.master')
+ self.api.Command['automountmap_add_indirect'](
+ keys[-1], u'auto.direct', key=u'/-'
+ )
return dn
api.register(automountlocation_add)