ma
branchcms
changeset 17 a4afc54e4b34
parent 16 65695e59a6f9
child 19 b55840a1ed97
equal deleted inserted replaced
16:65695e59a6f9 17:a4afc54e4b34
   150     die "Need ldap base.\n" if not $Cf->ldap_base;
   150     die "Need ldap base.\n" if not $Cf->ldap_base;
   151     if ($Cf->ldap_admin !~ /\Q$Cf->ldap_base/) {
   151     if ($Cf->ldap_admin !~ /\Q$Cf->ldap_base/) {
   152 	$Cf->ldap_admin($Cf->ldap_admin . "," . $Cf->ldap_base);
   152 	$Cf->ldap_admin($Cf->ldap_admin . "," . $Cf->ldap_base);
   153     }
   153     }
   154 
   154 
   155     print help() and exit 0 if $Cf->help;
   155     if ($Cf->help) {
       
   156 	if (-t STDOUT and -x "/usr/bin/less") { open(X, "|less -F") }
       
   157 	else { open(X, ">&STDOUT"); }
       
   158 	print X help();
       
   159 	exit 0;
       
   160     }
   156 
   161 
   157     @_ = grep { $_ =~ /^\Q$Module\E/ } qw/account alias shared group/;
   162     @_ = grep { $_ =~ /^\Q$Module\E/ } qw/account alias shared group/;
   158     die "Need module.  Try --help\n" if @_ == 0;
   163     die "Need module.  Try --help\n" if @_ == 0;
   159     die "Module ambigous. (@_)\n" if @_ > 1;
   164     die "Module ambigous. (@_)\n" if @_ > 1;
   160 
   165