Message ID | 20230627182731.3428042-1-stsp2@yandex.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | support busybox modprobe | expand |
On Tue, Jun 27, 2023 at 11:27:31PM +0500, Stas Sergeev wrote: > This modprobe writes help to stderr. > We need to redirect it to stdout, or it will end up in a test results. Which modprobe version writes help to stderr, can you show more details? Due to from my testing: # modprobe --help >/dev/null # modprobe --help 2>/dev/null Usage: modprobe [options] [-i] [-b] modulename modprobe [options] -a [-i] [-b] modulename [modulename...] modprobe [options] -r [-i] modulename modprobe [options] -r -a [-i] modulename [modulename...] modprobe [options] -c modprobe [options] --dump-modversions filename Management Options: -a, --all Consider every non-argument to .... ... > > Signed-off-by: Stas Sergeev <stsp2@yandex.ru> > --- > common/config | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/config b/common/config > index e479df8d..936ac225 100644 > --- a/common/config > +++ b/common/config > @@ -261,7 +261,7 @@ export UDEV_SETTLE_PROG > # Set MODPROBE_PATIENT_RM_TIMEOUT_SECONDS to "forever" if you want the patient > # modprobe removal to run forever trying to remove a module. > MODPROBE_REMOVE_PATIENT="" > -modprobe --help >& /dev/null && modprobe --help | grep -q -1 "remove-patiently" > +modprobe --help >& /dev/null && modprobe --help 2>&1 | grep -q -1 "remove-patiently" > if [[ $? -ne 0 ]]; then > if [[ -z "$MODPROBE_PATIENT_RM_TIMEOUT_SECONDS" ]]; then > # We will open code our own implementation of patient module > -- > 2.39.2 >
28.06.2023 13:52, Zorro Lang пишет: > On Tue, Jun 27, 2023 at 11:27:31PM +0500, Stas Sergeev wrote: >> This modprobe writes help to stderr. >> We need to redirect it to stdout, or it will end up in a test results. > Which modprobe version writes help to stderr, can you show more details? As I said already, its a busybox modprobe. BusyBox v1.36.0.
On Wed, Jun 28, 2023 at 03:25:05PM +0500, stsp wrote: > > 28.06.2023 13:52, Zorro Lang пишет: > > On Tue, Jun 27, 2023 at 11:27:31PM +0500, Stas Sergeev wrote: > > > This modprobe writes help to stderr. > > > We need to redirect it to stdout, or it will end up in a test results. > > Which modprobe version writes help to stderr, can you show more details? > As I said already, its a busybox modprobe. > BusyBox v1.36.0. OK, looks like this change won't affect anything else, so it's good to me. Reviewed-by: Zorro Lang <zlang@redhat.com> >
diff --git a/common/config b/common/config index e479df8d..936ac225 100644 --- a/common/config +++ b/common/config @@ -261,7 +261,7 @@ export UDEV_SETTLE_PROG # Set MODPROBE_PATIENT_RM_TIMEOUT_SECONDS to "forever" if you want the patient # modprobe removal to run forever trying to remove a module. MODPROBE_REMOVE_PATIENT="" -modprobe --help >& /dev/null && modprobe --help | grep -q -1 "remove-patiently" +modprobe --help >& /dev/null && modprobe --help 2>&1 | grep -q -1 "remove-patiently" if [[ $? -ne 0 ]]; then if [[ -z "$MODPROBE_PATIENT_RM_TIMEOUT_SECONDS" ]]; then # We will open code our own implementation of patient module
This modprobe writes help to stderr. We need to redirect it to stdout, or it will end up in a test results. Signed-off-by: Stas Sergeev <stsp2@yandex.ru> --- common/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)