Fix MirrorList when set to disabled

tags/ipasserelle-repo-0.2.16-1
Daniel Berteaud 4 years ago
parent bbaf583095
commit 8e4a7753d4
  1. 6
      root/etc/e-smith/templates-custom/etc/yum.smerepos.d/sme-base.repo/20repositories

@ -13,13 +13,13 @@
$OUT .= "enabled=" . (($repos->prop('status') eq 'enabled') ? 1 : 0) $OUT .= "enabled=" . (($repos->prop('status') eq 'enabled') ? 1 : 0)
. "\n"; . "\n";
if ( exists $props{MirrorList} ) if ( ! exists $props{MirrorList} or $props{MirrorList} eq "disabled" )
{ {
$OUT .= 'mirrorlist=' . $props{MirrorList} . "\n"; $OUT .= 'baseurl=' . $props{BaseURL} . "\n";
} }
else else
{ {
$OUT .= 'baseurl=' . $props{BaseURL} . "\n"; $OUT .= 'mirrorlist=' . $props{MirrorList} . "\n";
} }
for my $prop (qw(Name)) for my $prop (qw(Name))

Loading…
Cancel
Save