chiark / gitweb /
Add copyright notices.
authorijackson <ijackson>
Mon, 28 Jun 1999 15:14:14 +0000 (15:14 +0000)
committerijackson <ijackson>
Mon, 28 Jun 1999 15:14:14 +0000 (15:14 +0000)
12 files changed:
bcp5-registry.pl
cam-grin
config.pl
database.pl
listdb.pl
networks.pl
notice.txt
passwords.pl
run-from-lynx
template.html
update-staticpage.sh
utils.pl

index 217beba47c7627df58bcbee18c16398a7336d8cd..5ff917ad7c307dd17683416c66c781fa6fcc1a79 100755 (executable)
@@ -1,4 +1,22 @@
 #!/usr/bin/perl
+# Main G-RIN CGI script code.  Must be invoked with --cgi if
+# as a CGI script - see the example file cam-grin.
+#
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 use POSIX;
 
index 2f87d2a1fad0c07dd647241b38b442b9eb0b2b93..5e9b3467a6c93a819647174d535da4e8b6efe0dd 100755 (executable)
--- a/cam-grin
+++ b/cam-grin
@@ -1,4 +1,10 @@
 #!/bin/sh
+# Sample file for executing Cambridge G-RIN.  This is what it actually
+# invoked by the webserver, but of course you must edit it.
+# 
+# Written by Ian Jackson <ijackson@chiark.greenend.org.uk>, 1999.
+# I hereby place this file in the public domain.
+
 set -e
 umask 007
 cd /home/ijackson/things/bcp5-registry.cam-grin
index bd09cb6b48abbbdc6b22dd3a64147b62fbc8482a..9ed68e1bae14e954d29c46dc406366adb07b2c7f 100644 (file)
--- a/config.pl
+++ b/config.pl
@@ -1,3 +1,8 @@
+# Configuration file.  You should definitely edit this !
+# 
+# Written by Ian Jackson <ijackson@chiark.greenend.org.uk>, 1999.
+# I hereby place this file in the public domain.
+
 $whose= "Cambridge";
 $adminname= 'Ian Jackson';
 $adminemail= 'ijackson+cam-grin@chiark.greenend.org.uk';
index 6204043e2de66dab9d4ece8e3856cb402c15d1cf..063c5ae1d002bebe58886e64f2e3e851091d0b11 100644 (file)
@@ -1,4 +1,19 @@
+# G-RIN database handling.
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk
 #
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 @db_fields= qw(network prefix name contact email hiddenemail created changed);
 
index 7ffd064dcabc26bebd36fa91e6b2de7e6203afaf..91eee9c48898ccb1ba06043c1d742f297ce24420 100644 (file)
--- a/listdb.pl
+++ b/listdb.pl
@@ -1,4 +1,20 @@
+# Routines for actually displaying (parts of) database in CGI output.
 #
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 sub list_database ($) {
     my ($instyle) = @_;
index df8b13c0c60e18b6c88e94ec1d97951a823d1904..7d64551a0cc9deb57d1837920a3fb0b3c46cd828 100644 (file)
@@ -1,4 +1,20 @@
+# Network/range syntax and semantics handling.
 #
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 sub parse_netrange ($) {
     my ($net) = @_;
index aac9c7753b2e9daa4856c34eab1083baf17f6428..a9c05414133826076787945d2f433bdce21c4b59 100644 (file)
@@ -1,3 +1,11 @@
+@@@comment: Email notification template.  Edit this if you feel like it,
+@@@comment: but take care or the results may be strange.
+@@@comment: 
+@@@comment: Written by Ian Jackson <ijackson@chiark.greenend.org.uk>, 1999.
+@@@comment: I hereby place this file in the public domain.
+@@@comment: NB: do not add more copyright restrictions to this file,
+@@@comment: or running the scripts will cause copyright violation !
+
 From: "@@@adminname@@@" (@@@whose@@@ G-RIN administrator) <@@@adminemail@@@>
 To: "@@@contact@@@" <@@@alwaysemail@@@>
 
index f153d0d0b1877592ee49f4ffac22093ebf084982..430b4141cc46c07845522865e1eaa07edcccb544 100644 (file)
@@ -1,4 +1,20 @@
+# Password handling.
 #
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 use MD5;
 
index 29bb3d728d247d6920fc3d07c6778e8c73e59b98..7fbe21b28292b2d857616c776bc2c805b9a71a62 100755 (executable)
@@ -1,3 +1,21 @@
 #!/bin/sh
+# Script to allow testing, using the lynxcgi feature.
+#
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
 set -e
 exec lynx -cfg=/dev/null -nocolor "$@" lynxcgi:./bcp5-registry.pl
index e0a6a97799772f1c583b2c287af34a1ac530877e..ff8b4adea14ed0c7972510b6d2d0b3fe1b2ab853 100644 (file)
@@ -1,3 +1,11 @@
+@@@comment: Web page template.  Edit this if you feel like it,
+@@@comment: but take care or the results may be strange.
+@@@comment: 
+@@@comment: Written by Ian Jackson <ijackson@chiark.greenend.org.uk>, 1999.
+@@@comment: I hereby place this file in the public domain.
+@@@comment: NB: do not add more copyright restrictions to this file,
+@@@comment: or running the scripts will cause copyright violation !
+
 <html><head>
 
 <title>@@@whose@@@ G-RIN -
index 908ed6ccf23761343198d52464782d6fe9933847..dd871516ccbe846e6c9fba62e022cabd6926ccd9 100755 (executable)
@@ -1,4 +1,10 @@
 #!/bin/sh
+# Sample file for installing new Cambridge G-RIN main page.  Of course
+# you must edit this.
+# 
+# Written by Ian Jackson <ijackson@chiark.greenend.org.uk>, 1999.
+# I hereby place this file in the public domain.
+
 set -e
 file=/home/ijackson/public-html/cam-grin/index.html
 ./bcp5-registry.pl >$file.new
index 2e2b04879d3c4b871c0ae50a6719b95765e9e78e..41dcff8fcce933ff22e14e35c019ea5642dd13af 100644 (file)
--- a/utils.pl
+++ b/utils.pl
@@ -1,9 +1,25 @@
+# Various utility functions, including template substitution.
 #
+# Copyright (C) 1999 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 open RAND,"/dev/urandom" or die $!;
 
 sub process_file ($) {
-    my ($filename) = @_;
+    local ($filename) = @_;
     
     open X, "$filename" or die "$filename: $!";
     @x= <X>;
@@ -64,6 +80,7 @@ sub process ($) {
                }
            }
            process(0);
+       } elsif (m/^\@\@\@comment\:(\s.*)?$/) {
        } elsif (m/\S/) {
            s/^\@\@\@$//;
            if ($doing) {
@@ -72,7 +89,7 @@ sub process ($) {
            } else {
                s/\@\@\@\w+\@\@\@//g;
            }           
-           die "$cl:unknown $_\n" if m/\@\@\@/;
+           die "$filename:$cl:unknown $_\n" if m/\@\@\@/;
        }
     }
     $level--;
@@ -80,7 +97,7 @@ sub process ($) {
 
 sub getvar ($) {
     my ($vn) = @_;
-    defined $$vn or die "$cl:undefined $vn\n$out";
+    defined $$vn or die "$filename:$cl:undefined $vn\n$out";
     return $$vn;
 }