[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sheflug] Weird happenings with PERL script and cron




>
> > Even if this can't happen, it would be appropriately paranoid to check
> > the return values on all the system calls.
>
> It's quite hard to get return statuses (statii ??) from system("...")
> calls. A different approach would be to check for non-zeroness, eg
>
> system('rcp .... foo');
> die "Copied file 'foo' is non-existent/zero-length!!\n" unless -s 'foo';
>
> Of course, this wont detect a partially truncated file.
>
> [ But what has any of this got to do with Linux... ;-)  ]
>

QMail and funky file permissions?

Actually, although the file is in /var/qmail/alias it's not a qmail file. I
just keep it there so when we set up a new alias, we remember to create a
short code that willl be built into the LDAP configuration.

The other advantage is that both machines are on the same LAN, so the
likelihood of a copy fail should be fairly remote. One of the files is
delivered over Internet VPN by FTP from the US, so if anything, it's going
to get truncated before the rcp :-)

..and it's got bog-all to do with Linux!


--
David Morris
IT Manager, ALLVAC Ltd, Sheffield, UK
work: david [at] allvac.co.uk       (ICQ: 53264726) http://www.allvac.co.uk
home: david [at] brassedoff.net     (ICQ: 52728733) http://www.davidm.demon.co.uk

---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.