Date: Mon, 4 Aug 1997 15:34:06 -0700 (PDT) From: andrsn.stanford.edu@andrsn.stanford.edu To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/4227: cops perl script produces errors Message-ID: <199708042234.PAA10509@andrsn.stanford.edu> Resent-Message-ID: <199708042240.PAA02597@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708042234.PAA10509>