blob: 9708e2a5c63572bb5d0b162e8e9753c16c155b1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/local/bin/perl
#-*- perl -*-
#
# Copyright (C) 2001 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
# $FML$
#
unless (@ARGV) {
use FML::Utils qw(copy);
copy("main.cf", "/tmp/main.cf");
}
else {
my ($src, $dst) = @ARGV;
use IO::File::Atomic;
print "IO::File::Atomic->copy($src, $dst);\n";
print "sleep 3;\n";
sleep 3;
my $status = IO::File::Atomic->copy($src, $dst) || die("fail to copy");
}
exit 0;
|