From 62d71976f5f2cfa444f20dd267d31155e8966ea2 Mon Sep 17 00:00:00 2001 From: ijackson Date: Mon, 28 Jun 1999 15:14:14 +0000 Subject: [PATCH] Add copyright notices. --- bcp5-registry.pl | 18 ++++++++++++++++++ cam-grin | 6 ++++++ config.pl | 5 +++++ database.pl | 15 +++++++++++++++ listdb.pl | 16 ++++++++++++++++ networks.pl | 16 ++++++++++++++++ notice.txt | 8 ++++++++ passwords.pl | 16 ++++++++++++++++ run-from-lynx | 18 ++++++++++++++++++ template.html | 8 ++++++++ update-staticpage.sh | 6 ++++++ utils.pl | 23 ++++++++++++++++++++--- 12 files changed, 152 insertions(+), 3 deletions(-) diff --git a/bcp5-registry.pl b/bcp5-registry.pl index 217beba..5ff917a 100755 --- a/bcp5-registry.pl +++ b/bcp5-registry.pl @@ -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 +# +# 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; diff --git a/cam-grin b/cam-grin index 2f87d2a..5e9b346 100755 --- 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 , 1999. +# I hereby place this file in the public domain. + set -e umask 007 cd /home/ijackson/things/bcp5-registry.cam-grin diff --git a/config.pl b/config.pl index bd09cb6..9ed68e1 100644 --- a/config.pl +++ b/config.pl @@ -1,3 +1,8 @@ +# Configuration file. You should definitely edit this ! +# +# Written by Ian Jackson , 1999. +# I hereby place this file in the public domain. + $whose= "Cambridge"; $adminname= 'Ian Jackson'; $adminemail= 'ijackson+cam-grin@chiark.greenend.org.uk'; diff --git a/database.pl b/database.pl index 6204043..063c5ae 100644 --- a/database.pl +++ b/database.pl @@ -1,4 +1,19 @@ +# G-RIN database handling. +# Copyright (C) 1999 Ian Jackson +# +# 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) = @_; diff --git a/networks.pl b/networks.pl index df8b13c..7d64551 100644 --- a/networks.pl +++ b/networks.pl @@ -1,4 +1,20 @@ +# Network/range syntax and semantics handling. # +# Copyright (C) 1999 Ian Jackson +# +# 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) = @_; diff --git a/notice.txt b/notice.txt index aac9c77..a9c0541 100644 --- a/notice.txt +++ b/notice.txt @@ -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 , 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@@@> diff --git a/passwords.pl b/passwords.pl index f153d0d..430b414 100644 --- a/passwords.pl +++ b/passwords.pl @@ -1,4 +1,20 @@ +# Password handling. # +# Copyright (C) 1999 Ian Jackson +# +# 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; diff --git a/run-from-lynx b/run-from-lynx index 29bb3d7..7fbe21b 100755 --- a/run-from-lynx +++ b/run-from-lynx @@ -1,3 +1,21 @@ #!/bin/sh +# Script to allow testing, using the lynxcgi feature. +# +# Copyright (C) 1999 Ian Jackson +# +# 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 diff --git a/template.html b/template.html index e0a6a97..ff8b4ad 100644 --- a/template.html +++ b/template.html @@ -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 , 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 ! + @@@whose@@@ G-RIN - diff --git a/update-staticpage.sh b/update-staticpage.sh index 908ed6c..dd87151 100755 --- a/update-staticpage.sh +++ b/update-staticpage.sh @@ -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 diff --git a/utils.pl b/utils.pl index 2e2b048..41dcff8 100644 --- 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; } -- 2.30.2