From: ivan Date: Wed, 3 Mar 2004 16:32:08 +0000 (+0000) Subject: fix for case where no .fetchmailrc should be create and fetchmail should not be run X-Git-Tag: NET_WHOIS_RAW_0_31~108 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=24b5d695250eb0e93d50f35d0fa46776223d2a68 fix for case where no .fetchmailrc should be create and fetchmail should not be run --- diff --git a/bin/create-fetchmailrc b/bin/create-fetchmailrc index e92971140..11bde0ce3 100644 --- a/bin/create-fetchmailrc +++ b/bin/create-fetchmailrc @@ -22,6 +22,8 @@ my $filename = "$homedir/.fetchmailrc"; my $gid = scalar(getgrnam($username)) or die "can't find $username's gid\n"; my $uid = scalar(getpwnam($username)) or die "can't find $username's uid\n"; +exit unless $ARGV[0]; + open(FETCHMAILRC, ">$filename") or die "can't open $filename: $!\n"; chown $uid, $gid, $filename or die "can't chown $uid.$gid $filename: $!\n"; chmod 0600, $filename or die "can't chmod 600 $filename: $!\n";