#!/usr/bin/perl BEGIN { my $x = $0; $x =~ s/\/[^\/]+$//; if ($x eq $0 || $x eq '') { $x = `pwd`;chomp $x; }; require "$x/config.pl"; }; sub usage { print "usage: set_txt host txt..\n"; exit 1; } my $host = shift @ARGV; &usage if (!defined($host)); my (@txt) = (@ARGV); &usage if (scalar(@txt) < 1); my $ldap = &get_ldap_conn; $host =~ s/^\.//; $host =~ s/\.$//; my $desc = join('|', @txt); set_record($ldap, $host, [ dc => dc_domain($host), objectClass => 'dnsDomain', objectClass => 'dcObject', description => $desc, ], { description => $desc });