Lines 171-182
Link Here
|
171 |
my $vstate7 = "Link to File "; |
171 |
my $vstate7 = "Link to File "; |
172 |
my $vstate8 = "File to Link "; |
172 |
my $vstate8 = "File to Link "; |
173 |
my $vstate9 = "Link to Link "; |
173 |
my $vstate9 = "Link to Link "; |
174 |
### my $indexing_complete = "undefined"; |
174 |
### my $indexing_complete = "undefined"; |
175 |
my $md5sum; |
175 |
my $md5sum; |
176 |
my $md5sum_file; |
|
|
177 |
my $md5sum_index; |
178 |
my $md5sum_before; |
176 |
my $md5sum_before; |
179 |
my $md5sum_update; |
177 |
my $md5sum_update; |
180 |
my $md5sum_merged; |
178 |
my $md5sum_merged; |
181 |
my $md5sum_after; |
179 |
my $md5sum_after; |
182 |
my $show_warning; |
180 |
my $show_warning; |
Lines 977-986
Link Here
|
977 |
} |
975 |
} |
978 |
if ($opt_d >= 1) { $tab =~ s/ //; print "$tab"."</prepare_filenames_for_updating>\n"; } |
976 |
if ($opt_d >= 1) { $tab =~ s/ //; print "$tab"."</prepare_filenames_for_updating>\n"; } |
979 |
} |
977 |
} |
980 |
|
978 |
|
981 |
sub determine_state{ #DEPS# (requires that global variable $file1 contains a filename) |
979 |
sub determine_state{ #DEPS# (requires that global variable $file1 contains a filename) |
|
|
980 |
|
981 |
my $md5sum_file; |
982 |
my $md5sum_index; |
983 |
|
982 |
if ($opt_d >= 1) { print "$tab"."<determine_state>\n"; $tab = $tab." "; } |
984 |
if ($opt_d >= 1) { print "$tab"."<determine_state>\n"; $tab = $tab." "; } |
983 |
if (-f $index_file) { |
985 |
if (-f $index_file) { |
984 |
if ($opt_d >= 1) { if (-f $file1) { print "$tab"." md5sum $file1 $debug | cut -d\" \" -f1 $debug\n"; }} |
986 |
if ($opt_d >= 1) { if (-f $file1) { print "$tab"." md5sum $file1 $debug | cut -d\" \" -f1 $debug\n"; }} |
985 |
local $ENV{LC_ALL}="C"; |
987 |
local $ENV{LC_ALL}="C"; |
986 |
if ($file1 =~ /\/\//) { # search for // in filename, everything in front of this // is the path of the remote host |
988 |
if ($file1 =~ /\/\//) { # search for // in filename, everything in front of this // is the path of the remote host |
Lines 994-1004
Link Here
|
994 |
if ($opt_d >= 1) { print "$tab"." MD5 checksum of current config file : $md5sum_file\n"; } |
996 |
if ($opt_d >= 1) { print "$tab"." MD5 checksum of current config file : $md5sum_file\n"; } |
995 |
if ($opt_d >= 1) { print "$tab"." grep \"$file1_without_host \" $host_path$index_file $debug | cut -d\" \" -f2 $debug\n"; } |
997 |
if ($opt_d >= 1) { print "$tab"." grep \"$file1_without_host \" $host_path$index_file $debug | cut -d\" \" -f2 $debug\n"; } |
996 |
local $ENV{LC_ALL}="C"; |
998 |
local $ENV{LC_ALL}="C"; |
997 |
chomp ($md5sum_index = `grep "$file1_without_host " "$host_path$index_file" $debug | cut -d" " -f2 $debug`); |
999 |
chomp ($md5sum_index = `grep "$file1_without_host " "$host_path$index_file" $debug | cut -d" " -f2 $debug`); |
998 |
if ($opt_d >= 1) { print "$tab"." MD5 checksum in the checksum-index : $md5sum_index\n"; } |
1000 |
if ($opt_d >= 1) { print "$tab"." MD5 checksum in the checksum-index : $md5sum_index\n"; } |
999 |
if ($md5sum_index =~ /.+/) { |
1001 |
if ($md5sum_file && $md5sum_index =~ /.+/) { |
1000 |
if ($md5sum_index !~ $md5sum_file) { |
1002 |
if ($md5sum_index !~ $md5sum_file) { |
1001 |
$state = $state1; $vstate = $vstate1; # 1 = MF = Modified File - checksum differs from index |
1003 |
$state = $state1; $vstate = $vstate1; # 1 = MF = Modified File - checksum differs from index |
1002 |
if (-B "$file1") { $state = $state2; $vstate = $vstate2; } # 2 = MB = Modified Binary - you probably replaced the binary file so replace not allowed |
1004 |
if (-B "$file1") { $state = $state2; $vstate = $vstate2; } # 2 = MB = Modified Binary - you probably replaced the binary file so replace not allowed |
1003 |
} else { |
1005 |
} else { |
1004 |
$state = $state3; $vstate = $vstate3; # 3 = UF = Unmodified File - checksum matches with index |
1006 |
$state = $state3; $vstate = $vstate3; # 3 = UF = Unmodified File - checksum matches with index |