diff options
author | Tarik Gasmi | 2006-10-06 21:28:49 +0200 |
---|---|---|
committer | Tarik Gasmi | 2006-10-06 21:28:49 +0200 |
commit | 3737ab8c3f6f7fd5f6f3f7c38a26293e51032c50 (patch) | |
tree | 79b225a2b20004b46bc4c894d1f4d59106b1b9dd /initramfs | |
parent | added pxelink-script and ldapconf helper-functions (diff) | |
download | core-3737ab8c3f6f7fd5f6f3f7c38a26293e51032c50.tar.gz core-3737ab8c3f6f7fd5f6f3f7c38a26293e51032c50.tar.xz core-3737ab8c3f6f7fd5f6f3f7c38a26293e51032c50.zip |
added ldapconf helper-functions
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@445 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 6784c27e..1f739319 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -526,6 +526,24 @@ echo "finished" > /tmp/ldcfg ####################################################################### # configuration via ldap +# get_timeranges: helper function for ldapconf, retrieving timeranges +# of machineconfig-objects under search base $1 (Host,Group,Default) +get_timeranges(){ +trquery=`ldapsearch -x -H ldap://$ldapserver -b $1 -D $user -w $pwd -LLL \ +"(objectclass=machineconfig)" Timerange|sed -n '/Tim*/p'|sed 's/TimeRange: /#/'` +} +# matching_timerange: helper function for ldapconf to get "most +# specific timerange" matching actual time +matching_timerange(){ +} +# get_machineconfig: helper function for ldapconf, writing machine +# config data of one timerange $tr into file "tmp/confvialdap/$tr" +get_machineconfig(){ +ldapsearch -x -H ldap://$ldapserver -b $1 -D $user -w $pwd -LLL "(&(objectclass + =machineconfig)(timerange=$tr))"|sed '/dn:/d'|sed '/ou=/d'|sed '/dc=/d'|\ + sed '/objectC*/d'|sed '/Tim*/d'|sed '/cn:/d'|sed '/desc*/d'|sed 's/: /=/g' \ + |sed 's/-/_/g'` > tmp/confvialdap/$tr +} ldapconf () { local ldapserver=$1 error "$error_ldapcfg" |