}
if ($line =~ m/^(.*?\S)\s*=\s*(\S.*)$/) {
- $cfg->{$section}->{$1} = $2;
+ my ($key, $val) = ($1, $2);
+ # ceph treats ' ', '_' and '-' in keys the same, so we
+ # map it to '_' to get a consistent hash
+ $key =~ s/[-\ ]/_/g;
+ $cfg->{$section}->{$key} = $val;
}
}