From owner-freebsd-ports Mon Aug 4 15:40:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA02632 for ports-outgoing; Mon, 4 Aug 1997 15:40:06 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA02597; Mon, 4 Aug 1997 15:40:01 -0700 (PDT) Resent-Date: Mon, 4 Aug 1997 15:40:01 -0700 (PDT) Resent-Message-Id: <199708042240.PAA02597@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, andrsn.stanford.edu@andrsn.stanford.edu Received: from andrsn.stanford.edu (root@andrsn.Stanford.EDU [36.33.0.163]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA02255 for ; Mon, 4 Aug 1997 15:34:12 -0700 (PDT) Received: (from andrsn@localhost) by andrsn.stanford.edu (8.8.5/8.6.12) id PAA10509; Mon, 4 Aug 1997 15:34:06 -0700 (PDT) Message-Id: <199708042234.PAA10509@andrsn.stanford.edu> Date: Mon, 4 Aug 1997 15:34:06 -0700 (PDT) From: andrsn.stanford.edu@andrsn.stanford.edu Reply-To: andrsn.stanford.edu@andrsn.stanford.edu To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/4227: cops perl script produces errors Sender: owner-freebsd-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4227 >Category: ports >Synopsis: cops perl script produces errors >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 4 15:40:00 PDT 1997 >Last-Modified: >Originator: Annelise Anderson >Organization: Hoover Institution, Stanford University >Release: FreeBSD 2.2-STABLE i386 >Environment: 2.2-RELEASE >Description: running the perl version of cops produces error need: Can't open need and later -S: invalid option >How-To-Repeat: run perl version of cops from /cops/perl directory, i.e., /usr/local/cops/perl/cops >Fix: This fix uses perl4 (in /usr/bin); the original perl script looks for perl in /usr/local/bin. If perl5 is used a few additional changes are needed in the script; perl complains about precedence in the following lines, where parens are needed around CONFIG, FILE1, and FILE2 (roughly lines 86, 223, and 224, I think): open CONFIG || die "can't open $CONFIG: $!"; open FILE1 || die "can't open $FILE1: $!\n"; open FILE2 || die "can't open $FILE2: $!\n"; For perl4: *** cops.orig Tue Mar 10 10:59:44 1992 --- cops Mon Aug 4 11:47:51 1997 *************** *** 1,8 **** ! #!/bin/sh -- need to mention perl here to avoid recursion ! 'true' || eval 'exec perl -S $0 $argv:q'; ! eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' ! & eval 'exec /usr/local/bin/perl -S $0 $argv:q' ! if 0; # # Usage: cops [-vx] [-c config file] [-s secure_dir] [architecture] --- 1,4 ---- ! #!/usr/bin/perl # # Usage: cops [-vx] [-c config file] [-s secure_dir] [architecture] >Audit-Trail: >Unformatted: