I ran into several scripts that worked perfectly on CentOS 6 and 7, but failed when moved to CentOS 8. Below are a few real examples along with the fixes.
curl
A script I was using (originally inspired by 802.1x authentication on macOS and a GitHub example) contained:
# CentOS 7
curl --negotiate -u : ...
# CentOS 8
curl --http1.1 --negotiate -u : ...
Starting with newer versions of curl (7.47+), HTTP/2 support is enabled by default. In this case, the server negotiation attempt over HTTP/2 failed, then fallback behavior didn’t work as expected.
Forcing HTTP/1.1 with --http1.1 resolved the issue.
openssl
Running the same command on CentOS 7 vs 8 produces different output formats:
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -issuer 2>/dev/null
CentOS 7 output:
issuer= /C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA
issuer=C = US, O = DigiCert Inc, CN = DigiCert SHA2 Secure Server CA
- Slashes replaced with commas
- Spaces added around equals signs
This broke parsing logic in scripts.
Original (CentOS 7 only):
grep -o 'CN=.*' | cut -f2- -d"="
grep -o 'CN.*' | cut -f2- -d"=" | awk '{$1=$1};1'
awk trims leading whitespace introduced in the newer format.ClamAV
This one is less about CentOS itself and more about a major version jump in ClamAV.
Both CentOS 7 and 8 were previously using:
ClamAV 0.101.5
ClamAV 0.102.2-2
ScanOnAccess→ deprecated and non-functional- Replaced by:
clamonacc(daemon-based) - Configuration behavior changed
Notable observations:
OnAccessMountPathworks (despite documentation suggesting otherwise)OnAccessIncludePathdid not work in testingLocalSocketcould not be used successfullyTCPSocket/TCPAddrworked instead
This required reworking scripts and expectations around how on-access scanning is configured.
Takeaway
Even when commands look identical across versions, behavior can change due to:
- Protocol defaults (HTTP/2 vs HTTP/1.1)
- Output formatting differences (openssl)
- Major upstream application changes (ClamAV)
When moving scripts between OS versions:
- Always check tool versions (
curl --version,openssl version, etc.) - Expect parsing logic to break
- Be cautious of silent behavioral changes