Prevent error in snmpconf script with recent perl.

Reported by:	daver@vicor.com (Pomegranate)
This commit is contained in:
Jun Kuriyama 2004-05-12 02:53:49 +00:00
parent d7ecf99e13
commit d3399fc581
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108964
6 changed files with 33 additions and 6 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= snmp PORTNAME= snmp
PORTVERSION= 5.1.1 PORTVERSION= 5.1.1
PORTREVISION= 3 PORTREVISION= 4
PKGNAMEPREFIX= net- PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6 CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}

View file

@ -1,5 +1,5 @@
--- local/snmpconf.orig Wed Feb 11 01:33:42 2004 --- local/snmpconf.orig Wed Feb 11 01:33:42 2004
+++ local/snmpconf Fri Apr 2 23:42:35 2004 +++ local/snmpconf Wed May 12 11:51:15 2004
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/usr/bin/perl -w -#!/usr/bin/perl -w
+#!%%PERL%% -w +#!%%PERL%% -w
@ -42,6 +42,15 @@
move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i"); move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
if (move ("$didfile{$i}", "$opts{'I'}")) { if (move ("$didfile{$i}", "$opts{'I'}")) {
@@ -171,7 +171,7 @@
print ("File $didfile{$i} left in current directory\n");
}
} elsif ($opts{'p'}) {
- if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir ("$ENV{HOME}/.snmp"))) {
+ if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir("$ENV{HOME}/.snmp", 0777))) {
print "\nCould not create $ENV{HOME}/.snmp directory: $!\n";
print ("File $didfile{$i} left in current directory\n");
}
@@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
} }

View file

@ -7,7 +7,7 @@
PORTNAME= snmp PORTNAME= snmp
PORTVERSION= 5.1.1 PORTVERSION= 5.1.1
PORTREVISION= 3 PORTREVISION= 4
PKGNAMEPREFIX= net- PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6 CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}

View file

@ -1,5 +1,5 @@
--- local/snmpconf.orig Wed Feb 11 01:33:42 2004 --- local/snmpconf.orig Wed Feb 11 01:33:42 2004
+++ local/snmpconf Fri Apr 2 23:42:35 2004 +++ local/snmpconf Wed May 12 11:51:15 2004
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/usr/bin/perl -w -#!/usr/bin/perl -w
+#!%%PERL%% -w +#!%%PERL%% -w
@ -42,6 +42,15 @@
move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i"); move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
if (move ("$didfile{$i}", "$opts{'I'}")) { if (move ("$didfile{$i}", "$opts{'I'}")) {
@@ -171,7 +171,7 @@
print ("File $didfile{$i} left in current directory\n");
}
} elsif ($opts{'p'}) {
- if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir ("$ENV{HOME}/.snmp"))) {
+ if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir("$ENV{HOME}/.snmp", 0777))) {
print "\nCould not create $ENV{HOME}/.snmp directory: $!\n";
print ("File $didfile{$i} left in current directory\n");
}
@@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
} }

View file

@ -7,7 +7,7 @@
PORTNAME= snmp PORTNAME= snmp
PORTVERSION= 5.1.1 PORTVERSION= 5.1.1
PORTREVISION= 3 PORTREVISION= 4
PKGNAMEPREFIX= net- PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6 CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}

View file

@ -1,5 +1,5 @@
--- local/snmpconf.orig Wed Feb 11 01:33:42 2004 --- local/snmpconf.orig Wed Feb 11 01:33:42 2004
+++ local/snmpconf Fri Apr 2 23:42:35 2004 +++ local/snmpconf Wed May 12 11:51:15 2004
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/usr/bin/perl -w -#!/usr/bin/perl -w
+#!%%PERL%% -w +#!%%PERL%% -w
@ -42,6 +42,15 @@
move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i"); move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
if (move ("$didfile{$i}", "$opts{'I'}")) { if (move ("$didfile{$i}", "$opts{'I'}")) {
@@ -171,7 +171,7 @@
print ("File $didfile{$i} left in current directory\n");
}
} elsif ($opts{'p'}) {
- if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir ("$ENV{HOME}/.snmp"))) {
+ if (! (-d "$ENV{HOME}/.snmp") && ! (mkdir("$ENV{HOME}/.snmp", 0777))) {
print "\nCould not create $ENV{HOME}/.snmp directory: $!\n";
print ("File $didfile{$i} left in current directory\n");
}
@@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
} }