Sorry to ask you guys, but I know nothing of Perl, and I'm in desprate need
of help.
I have the following code, but it always go into the else statement, even
thoug the mirror file does not exist - why?
Is the link command in some kind of Perl module I do not have?
#!/usr/bin/perl
# Only sync if serving IP
open(X,"/sbin/ifconfig|");
while(<X>) {
if (/eth0:0/) {
#make sure previous mirror has completed...
if (link("/etc/ha.d/ha.cf", "/var/lock/subsys/mirror")) {
system
"/usr/bin/rsync --rsh=/usr/bin/ssh -aurvlq --delete /projects/
62.243.245.114:/projects";
# release rsync process
unlink "/var/lock/subsys/mirror";
} else {
open(MAIL,"|mail s.neigaard\@mobilethink.dk");
print MAIL "Next RSYNC process starting before
previous has completed!\n";
close MAIL;
exit;
}
}
}
Med venlig hilsen/Best regards
S�ren Neigaard
System Architect
................................
Mobilethink A/S
Arosgaarden
�boulevarden 23, 5.sal
DK - 8000 �rhus C
Telefon: +45 86207800
Direct: +45 86207810
Fax: +45 86207801
Email: [EMAIL PROTECTED]
Web: www.mobilethink.dk
................................
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list