Ignore:
Timestamp:
Feb 14, 2010 2:25:46 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
b7f6ccc
Parents:
d87778f
Message:

Moving toward the federation scripts that don't rely on tmcd forwarding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/rc.fedaccounts

    rd87778f rc0a8738  
    3939
    4040my $old_accts = "/usr/local/federation/etc/old_accts";
    41 my $accts = "/usr/local/federation/etc/accts";
     41my $accts = "/usr/local/federation/etc/userconf";
    4242
    4343fatal("Need both $old_accts and $accts") unless -e $old_accts && -e $accts;
     
    8181        os_groupadd($group, $gid);
    8282    };
    83     /^ADDUSER\s+LOGIN=([-\w]+)\s+PSWD=([^:]+)\s+UID=(\d+)\s+GID=(\d+)\s+
    84         ROOT=(\d)\s+NAME="([^"]+)"\s+HOMEDIR=(\S+)\s+GLIST="([^"]*)"\s+
    85         SERIAL=(\d+)\s+EMAIL="([^"]*)"\s+SHELL=(\S+)/x && do {
    86             my ($login, $pswd, $uid, $gid, $root, $name, $hdir, $glist,
    87                 $serial, $email, $shell) =
    88             ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);
     83    /^ADDUSER\s+/ && do {
     84        my $login;
     85        my $pswd;
     86        my $uid;
     87        my $gid;
     88        my $root;
     89        my $name;
     90        my $hdir;
     91        my $glist;
     92        my $serial;
     93        my $email;
     94        my $shell;
    8995
    90             print "Adding $login $uid $gid\n";
    91             os_useradd($login, $uid, $gid, $pswd, "$glist", $hdir, $name,
    92                 $root, $shell);
    93             os_mkdir($hdir, "0755") unless -e $hdir;
    94             next;
     96        /LOGIN=([\S]+)/ && do { $login = $1; };
     97        /PSWD=(\S+)/ && do { $pswd=$1; } ;
     98        /UID=(\d+)/ && do { $uid = $1; };
     99        /GID=(\d+)/ && do { $gid = $1; };
     100        /ROOT=(\d)/ && do { $root = $1; };
     101        /NAME="([^"]*)"/ && do { $name = $1; };
     102        /HOMEDIR=(\S+)/ && do { $hdir = $1; };
     103        /GLIST="([^"]*)"/ && do { $glist = $1; };
     104        /SERIAL=(\d+)/ && do { $serial = $1; };
     105        /EMAIL="([^"]*)"/ && do { $email=$1; };
     106        /SHELL=(\S+)/ && do { $shell = $1; };
     107
     108        print "Adding $login $uid $gid\n";
     109        os_useradd($login, $uid, $gid, $pswd, "$glist", $hdir, $name,
     110            $root, $shell);
     111        os_mkdir($hdir, "0755") unless -e $hdir;
     112        next;
    95113    };
    96114}
Note: See TracChangeset for help on using the changeset viewer.