[LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe
Petr Vorel
pvorel@suse.cz
Mon Sep 2 13:00:37 CEST 2024
Hi Cyril, Wei,
> Hi!
> > if grep -q suse /etc/os-release; then
> There are a couple of english words that contain "suse" as a substring
> if one of these ends up in the os-release it would match, e.g. the
> os-release may contain VERSION="24 (Disused Miracle)". And yes both
> Fedora and Ubuntu seems to include the the code names in the file.
> So I would be stricter here and checked for ID=suse.
Very good point.
FYI SLES (removed non-related lines)
NAME="SLES"
VERSION="15-SP6"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP6"
ID="sles"
ID_LIKE="suse"
SLE Micro (removed non-related lines):
NAME="SL-Micro"
PRETTY_NAME="SUSE Linux Micro 6.0"
ID="sl-micro"
ID_LIKE="suse"
Debian:
NAME="Debian GNU/Linux"
ID=debian
=> SUSE quite all variables, but at least Debian not (ID=debian).
Therefore for more complex scenarios I would source the file
(. /etc/os-release). But in this case grep sl-micro could be enough
(unique enough).
Will you ack this change (RBT/ABT) in v2 [1] (newer version than this, I would
change before merge)?
- if grep -q suse /etc/os-release; then
+ if grep -q 'sl-micro' /etc/os-release; then
Kind regards,
Petr
[1] https://patchwork.ozlabs.org/project/ltp/patch/20240902024017.6404-1-wegao@suse.com/
More information about the ltp
mailing list