Commit Graph

130 Commits

Author SHA1 Message Date
Maxwell 898ad7f3ea Adds License File 2021-06-29 07:15:49 +12:00
Peter Ajamian dfce36e61a
efibootmgr needs separate disk and partition (#52)
* efibootmgr needs separate disk and partition

efibootmgr needs a separate device (/dev/xxx) and partition number.

Co-authored-by: McNutnut <mcnutnut90@gmail.com>
2021-06-27 21:53:34 +12:00
Peter Ajamian aba39dd294 Suggest to remove dnf-plugin-subscription-manager
issue 40
2021-06-25 22:54:48 +12:00
Klaus Sperner 716c0ac89c
rocky-linux/rocky-tools#41 Add note to README about OpenJDK packages (#47)
* rocky-linux/rocky-tools#41 Add note to README about OpenJDK packages

* rocky-linux/rocky-tools#41 Add note to README about OpenJDK packages

- add link to bugzilla entry
- add workaround script
2021-06-25 19:43:19 +12:00
Louis Abel 062f6c44bd
Merge pull request #38 from breca/main
Continues on empty lines from repoquery
2021-06-23 21:34:17 -07:00
Louis Abel 32ab115ea2
Merge pull request #37 from StackKorora/Fix-broken-link
Update broken link in mirror readme
2021-06-23 21:34:01 -07:00
Louis Abel 0aafb93884
Merge pull request #35 from lumarel/main
Improve checks against modified default repositories
2021-06-23 21:29:45 -07:00
Louis Abel f925ff6d09
Merge pull request #43 from robert-scheck/rocky-logos-httpd
Add mapping for rocky-logos-httpd
2021-06-23 21:29:27 -07:00
Robert Scheck 9c5c8519d3 Add mapping for rocky-logos-httpd 2021-06-22 22:50:07 +02:00
Brett C eeff0c3b94 Refactor for more efficient evaulation 2021-06-22 19:03:18 +10:00
Brett C 078779f2e6 Continues on empty lines from repoquery 2021-06-22 18:38:20 +10:00
Louis Abel e118e7a0fd
Merge pull request #36 from pajamian/main
Fix issue with oracle 8.4, shellcheck directives
2021-06-21 14:20:52 -07:00
lumarel 17b6ad6ebb Strengten other check 2021-06-21 22:52:27 +02:00
lumarel 9a6ad7a5f2 Improve wording and always block if Katello was configured 2021-06-21 22:50:40 +02:00
lumarel ad5f8b2e27 More checking to make sure to not get any other configurations 2021-06-21 20:58:48 +02:00
StackKorora 07f1ee9845
Update broken link 2021-06-21 10:31:37 -05:00
Peter Ajamian d9b0081501 Fix issue with migration from Oracle 8.4
Oracle 8.4 moved some files from their oraclelinux-release package to a new
package named redhat-release.  This update makes sure to remove redhat-release
as well as the other packages during migration to avoid conflicts with
rocky-release.
2021-06-22 03:06:16 +12:00
lumarel 00cff404c8 Improve checks against modified default repositories 2021-06-20 23:08:30 +02:00
Peter Ajamian 058fec2a60
Merge branch 'rocky-linux:main' into main 2021-06-21 06:56:38 +12:00
Peter Ajamian 6957c0c4dd Add shellcheck directives
Some commands trigger false positives in shellcheck.  Add directives to tell
shellcheck not to complain about them.
2021-06-21 06:54:44 +12:00
Louis Abel 5fd8f36329
Merge pull request #34 from pajamian/main
Add Color back in, Fix Subscription Manager Issues
2021-06-20 10:35:19 -07:00
Peter Ajamian 5dc03bc40d Fix subscription-manger issues.
After a RHEL conversion any attempt to run subscription-manager would result in
an error.  this was due to the RedHat certs having been replaced on the system
during the migration.  To fix this we now copy any subscription-manager certs to
a temporary directory and if they have been removed during the migration we copy
them back at the finish.  This means that subscription-manager now won't stop
working after a migration from RHEL.
2021-06-21 05:10:24 +12:00
Peter Ajamian 51378a2efc Merge branch 'main' of github.com:pajamian/rocky-tools into main 2021-06-21 00:12:40 +12:00
Peter Ajamian fe473ae20b Add color back in
We previously removed color because (1) it was outputting the color codes to the
log file, which we do not want and (2) nobody could agree on what colors to use.
I've reintroduced color now fixing (1) by allowing for separate output to the
log file and the console and only sending the color codes to the console and (2)
well, I've changed the blue for info messages to cyan, hopefully everyone's
happy with that, but I'm open to suggestions on the info color.

There are now three more file descriptors for specialized output control, making a total of 5:

fd1 - This sends to stdout and to the log file.
fd2 - This sends to stderr and the log file.
fd3 - This just sends to stdout.
fd4 - This just sends to stderr.
fd5 - This just sends to the logfile.

There are also three additional functions:

msg_format - Intended to be used by infomsg and errmsg, this accepts a variable
name and one or more string args.  If there is just one string after the
variable name then it is copied to the variable verbatim.  If there is more than
one then it is taken to be a format specifier and additional args to be passed
to printf (output going to the variable).

infomsg - This will accept either a single arg which contains a verbatim string
or multiple format / args to be processed by printf.  The output of this will be
sent to the log file and also color coded and sent to stdout.

errmsg - Like infomsg but it uses the error color and sends output to stderr
instead of stdout.
2021-06-21 00:01:02 +12:00
Neil Hanlon d94098d26d
Merge pull request #33 from pajamian/main
Minor change: Don't output /etc/issue when migration is complete.
2021-06-13 10:58:43 -04:00
Peter Ajamian c7f8aae697 Merge branch 'main' of github.com:pajamian/rocky-tools into main 2021-06-13 15:08:49 +12:00
Peter Ajamian a4faff4b22 Don't output /etc/issue
/etc/issue used to contain a nice ascii-art RockyLinux logo that we would output
when this script was finished, but it doesn't anymore so there is no longer any
value to outputting this file.
2021-06-13 15:06:49 +12:00
Neil Hanlon 2d4a24b5fc
Merge pull request #32 from pajamian/main
Move some checks to the top of the script.
2021-06-12 09:00:16 -04:00
Peter Ajamian 72927f398e Group bash tests together 2021-06-13 00:36:43 +12:00
Peter Ajamian b587a7e7a4 Move more tests to the top
Test for teh bash version and root at the top as well, to avoid errors from
commands that otherwise get run before the tests.
2021-06-13 00:30:05 +12:00
Peter Ajamian 5051fc5312 Test for bash at the top.
Put a test for bash at the top to make sure that people don't try to run in
POSIX sh mode.
2021-06-12 23:58:38 +12:00
Louis Abel 20c7162a9f
Merge pull request #31 from electroniceel/migrate2rocky-subdir
Move migrate2rocky into it's own subdirectory.
2021-06-11 11:44:21 -07:00
Electronic Eel 750ed26f99 Move migrate2rocky into it's own subdirectory.
Clean up the rocky-tools root dir, the mirror script has it's own subdir too.
This makes rocky-tools scale better. As this breaks existing links, we should
do it as early as possible, before GA.
2021-06-11 19:17:16 +02:00
Louis Abel 761a27fecd
Merge pull request #26 from netzwergehh/patch-1
Create mirrorsync.sh
2021-06-11 09:28:21 -07:00
Neil Hanlon a1a23bea8d
Merge pull request #28 from pajamian/main
Katello Notes
2021-06-04 20:10:03 -04:00
Peter Ajamian d3affffb67 Fix typo 2021-06-05 12:05:35 +12:00
Peter Ajamian 8b30d758e4 Add pre_check for Katello
Missed adding the function call in previous commit.
2021-06-05 11:55:09 +12:00
Peter Ajamian d3070e9493 Bail on Katello systems.
Katello breaks EL systems to the point where migrate2rocky can't properly
migrate them and any attempt to do so causes major corruption.  This prevents
migrate2rocky from running on Katello systems.
2021-06-05 11:51:02 +12:00
Peter Ajamian 3dbad4d658 Merge branch 'main' of github.com:pajamian/rocky-tools into main 2021-06-05 11:33:09 +12:00
Peter Ajamian aafffd330d Fix Typo 2021-06-05 11:32:23 +12:00
Peter Ajamian 4fc1c1db1a Merge branch 'rocky-linux:main' into main 2021-06-05 11:31:32 +12:00
Peter Ajamian c38eeaecba Add note to README about katello systems 2021-06-05 11:30:45 +12:00
Neil Hanlon 7d8e7ae627
Merge pull request #27 from pajamian/main
Fix various issues found by shellcheck + Fix issues when migrating from CentOS 8.3 after 8.4 dropped
2021-06-04 07:35:35 -04:00
Peter Ajamian 844896ad6b Fix rpm and dnf package spec issues
When attempting to check if a package exists for a particular provide string
what happened is if an older version of the package was on the system but a
newer version in the repositories then the older (system) version would be
returned by dnf provides, but this could not be translated into a package name
with dnf repoquery because that specific version could not be found in the
repos.  The solution was to check rpm first to translate the package name on the
system and then dnf repoquery if rpm doesn't find it.

This brought to light issues when passing arrays of package names to rpm and dnf
which might happen to contain an empty element.  In this case rpm and dnf would
consider the empty arg an indicator that it should match all packages on the
system, or all available packages.  While we should try to avoid passing arrays
with empty elements, this highlighed a need to make rpm and dnf safer in this
regard, and so there are now saferpm and sfednf functions which simply strip any
empty args before calling the appropriate command with the rest of the args
untouched.

This commit also fixes an issue with output column formatting.
2021-06-04 22:11:15 +12:00
Peter Ajamian ef1cfd1fb9 Fix various issues found by shellcheck
Shellcheck found various issues that have cropped up over time.  This commit
fixes those issues.
2021-06-04 02:16:43 +12:00
Dennis Körner 77cc1be64a
Update README.md 2021-06-03 14:02:41 +02:00
Dennis Körner fd3994bff4
Update README.md 2021-06-03 14:01:55 +02:00
Dennis Körner b9f58f2cdc
Create example.crontab 2021-06-03 14:01:01 +02:00
Dennis Körner 15ed2e33ab
Create README.md 2021-06-03 13:59:05 +02:00
Dennis Körner 7ee8e846fc
Rename mirrorsync.sh to mirror/mirrorsync.sh 2021-06-03 13:25:03 +02:00