Common.pm
branchfoerste-hhsp
changeset 75 63b7c7fcd0cb
parent 64 6a6c18cddf46
equal deleted inserted replaced
74:b82a656f784e 75:63b7c7fcd0cb
    89     ldap_at_primaryaddress =>
    89     ldap_at_primaryaddress =>
    90       { ARGS => "=s", DEFAULT => "XXXmailPrimaryAddress" },
    90       { ARGS => "=s", DEFAULT => "XXXmailPrimaryAddress" },
    91 
    91 
    92 );
    92 );
    93 
    93 
       
    94 {
       
    95     my @pw;
       
    96 
       
    97     sub mkpw($) {
       
    98         my $in = $_[0];
       
    99 
       
   100         return $in unless $in and $in eq "{pwgen}";
       
   101 
       
   102         if ( !@pw ) {
       
   103             chomp( @pw = `pwgen -nc 12 1 2>/dev/null` );
       
   104             die "pwgen: $!" if $?;
       
   105         }
       
   106         return shift @pw;
       
   107 
       
   108     }
       
   109 }
       
   110 
    94 1;
   111 1;