]> andersk Git - moira.git/blobdiff - afssync/INSTRUCTIONS
Command line printer manipulation client, and build goo.
[moira.git] / afssync / INSTRUCTIONS
index e76c9ae815f9e99d6ca1ff55fe35bb976937c811..6b3d94e8c7090e46efafc464f101eaa7acc1a6cd 100644 (file)
@@ -10,11 +10,12 @@ cd /moira/sync
 ####   This is preparation for the resync, to save non-Moira users.    ####
 First, get a recent copy of the prdb, and extract non-Moira entries:
 
-       /moira/bin/udebug aggy -port 7002
-       rcp -px root@aggy:/usr/afs/db/prdb.DB0 prdb.old
-       /moira/bin/udebug aggy -port 7002
+       /moira/bin/udebug prill -port 7002
+       rcp -px root@prill:/usr/afs/db/prdb.DB0 prdb.old
+       /moira/bin/udebug prill -port 7002
 If the two udebugs show that the version changed, lather-rinse-repeat.
-(udebug can be found in afsuser; "aggy" here and below is some DB server)
+(udebug can be found in /usr/athena/bin; "prill" here and below is some 
+DB server)
 (Also check for "0 of them for write" at the end.  It might matter.)
 
        /moira/bin/pt_util -x -m -u -g -d prdb.extra -p prdb.old
@@ -23,11 +24,41 @@ to extract and prepare the personal groups and special user entries in
 the old prdb for being reincorporated into the new prdb.
 
        awk -F\| '$9 == 3 {print $1}' /backup/backup_1/users > /tmp/deactivated
-       perl -e 'for(`cat /tmp/deactivated`) { chop; $ex{$_}=1;} \
-               $punt=0; foreach $L (`cat prdb.extra.sort`){ \
-               @w=split(/ /,$L);  $_=$w[0]; if ( /:/ ) \
-               {@x=split(/:/,$w[0]); if($ex{$x[0]}) {$punt=1;}else{$punt=0;}} \
-               print $L unless $punt==1;}' > prdb.extra.trimmed
+
+and the following perl script:
+
+#!/usr/athena/bin/perl -w
+
+open(OUT, ">prdb.extra.trimmed");
+
+for ( `cat /tmp/deactivated` ) {
+    chop;
+    $ex{$_} = 1;
+}
+
+$punt = 0;
+
+foreach $L ( `cat prdb.extra.sort` ) {
+    @w = split(/ /,$L);
+    $_ = $w[0];
+    if ( /:/ ) {
+        @x = split(/:/,$w[0]);
+        if ($ex{$x[0]}) {
+            $punt=1;
+        } else {
+            $punt=0;
+        }
+    } else {
+       # If we got here, we're either a user, a prefixless
+       # group, or a group member.
+       $punt = 0 if $w[0];
+    }
+    print OUT $L unless $punt == 1;
+}
+
+close(OUT);
+exit 0;
+
 to remove the personal groups for users who are deactivated
 
        awk '/^[^ ][^:]*@/ {printf "KERBEROS:%s\n",$1}' prdb.extra.trimmed \
@@ -97,7 +128,7 @@ personal groups was deactivated and the uid was re-used (this was
 becasue we didn't trim the prdb.extra.sort file in the past.))
 Assuming htese errors are due to a username change, the groups should
 be renamed, and you should regenerate prdb.extra.trimmed starting with
-a fresh prdb from aggy.  (You may want to abort and
+a fresh prdb from prill.  (You may want to abort and
 rm /moira/afs/noafs and try again later.)
 
        pts listmax > prdb.listmax
This page took 0.031819 seconds and 4 git commands to generate.