-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #21669 - Use $major on CentOS media, $version deprecated
As we can see, CentOS fixed their repos so that http://mirror.centos.org/centos/7 returns the latest version we need for vmlinuz, etc.. For a long time they only offered these files under specific version dirs, but now they have deprecated this and we should just refer to $major, not $major.$minor See the notice at http://mirror.centos.org/centos/7.3.1611/readme
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
db/migrate/20171121082256_update_centos_installation_media.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class UpdateCentosInstallationMedia < ActiveRecord::Migration | ||
def change | ||
Medium.unscoped.where( | ||
:name => 'CentOS mirror', | ||
:os_family => 'Redhat', | ||
:path => 'http://mirror.centos.org/centos/$version/os/$arch' | ||
).update_all(:path => 'http://mirror.centos.org/centos/$major/os/$arch') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters