Ignore:
Timestamp:
Dec 15, 2010, 1:30:41 AM (12 years ago)
Author:
mitchb
Message:
Add a hook for disabling signups globally or per-server

Resolves Trac #186
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/accountadm/signup-scripts-backend.in

    r1756 r1757  
    8080complain("gid already taken") if(getgrgid $gid1);
    8181
     82my $disabledmsg = "scripts.mit.edu signups are currently disabled";
     83if(-e "/afs/athena.mit.edu/contrib/scripts/admin/nosignup") {
     84        open NOSIGNUP, "</afs/athena.mit.edu/contrib/scripts/admin/nosignup" or
     85                complain("internal error");
     86        while (<NOSIGNUP>) {
     87                chomp;
     88                $disabledmsg .= "\n$_";
     89        }
     90        close NOSIGNUP;
     91        complain($disabledmsg);
     92}
     93elsif(-e "/etc/nosignup") {
     94        $disabledmsg .= " on this server";
     95        open NOSIGNUP, "</etc/nosignup" or complain("internal error");
     96        while (<NOSIGNUP>) {
     97                chomp;
     98                $disabledmsg .= "\n$_";
     99        }
     100        close NOSIGNUP;
     101        complain($disabledmsg);
     102}
     103
    82104my $pid;
    83105defined ($pid = open LDAP, '|-') or complain("internal error");
Note: See TracChangeset for help on using the changeset viewer.