On Fri, Sep 03, 2004 at 01:49:53PM -0400, Gavino Siciliano wrote:
> bash-2.03# snmpconf -g basic_setup
> Not enough arguments for mkdir at /usr/local/bin/snmpconf line 186, near
> ""$opts{'I'}")"
It seems that the very old perl version that ships with Solaris has the
mode as a required parameter for mkdir. Newer versions (5.6 and up) has
the mode as an optional.
The following patch should fix that:
diff -u -r5.2.4.3 snmpconf
--- local/snmpconf 20 Apr 2004 14:20:51 -0000 5.2.4.3
+++ local/snmpconf 3 Sep 2004 22:02:04 -0000
@@ -183,7 +183,7 @@
if ($opts{'i'} || $opts{'I'}) {
$opts{'I'} = "$confpath" if (!$opts{'I'});
- if (! (-d "$opts{'I'}") && ! (mkdir ("$opts{'I'}"))) {
+ if (! (-d "$opts{'I'}") && ! (mkdir ("$opts{'I'}", 0755))) {
print "\nCould not create $opts{'I'} directory: $!\n";
print ("File $didfile{$i} left in current directory\n");
}
@@ -198,7 +198,7 @@
}
}
} elsif ($opts{'p'}) {
- if (! (-d "$home") && ! (mkdir ("$home"))) {
+ if (! (-d "$home") && ! (mkdir ("$home", 0755))) {
print "\nCould not create $home directory: $!\n";
print ("File $didfile{$i} left in current directory\n");
}
/Niels
--
Niels Baggesen - @home - �rhus - Denmark - [EMAIL PROTECTED]
The purpose of computing is insight, not numbers --- R W Hamming
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id808&op=click
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users