[Ovirt-devel] [PATCH node] handle list of variables to ignore

Mike Burns mburns at redhat.com
Tue Sep 13 10:55:04 UTC 2011


On Mon, 2011-09-12 at 19:16 -0400, Mike Burns wrote:
> rhbz#723115
> 
> Signed-off-by: Mike Burns <mburns at redhat.com>
> ---
>  ovirt-node.spec.in  |    4 ++++
>  scripts/ovirt-early |    6 +++++-
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
> index 2d8a4bf..8321ba7 100644
> --- a/ovirt-node.spec.in
> +++ b/ovirt-node.spec.in
> @@ -180,6 +180,9 @@ echo "# File where default configuration is kept" > %{buildroot}/%{_sysconfdir}/
>  # ovirt-early vendor hook dir
>  %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-early.d
> 
> +# ovirt-early vendor commandline variables
> +%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-commandline.d
> +
> 
>  %clean
>  %{__rm} -rf %{buildroot}
> @@ -299,6 +302,7 @@ fi
>  %{_initrddir}/ovirt
>  %{_initrddir}/ovirt-post
>  %{_sysconfdir}/ovirt-early.d
> +%{_sysconfdir}/ovirt-commandline.d
> 
>  %changelog
>  * Mon Jun 20 2011 Alan Pevec <apevec at redhat.com> 2.0.0-1
> diff --git a/scripts/ovirt-early b/scripts/ovirt-early
> index 0f617f7..322e16d 100755
> --- a/scripts/ovirt-early
> +++ b/scripts/ovirt-early
> @@ -644,7 +644,11 @@ start_ovirt_early () {
>              done
>              ;;
>              *)
> -            bootparams="$bootparams $i"
> +            # check the params to be ignored before adding to bootparams
> +            varname=${i%=*}
> +            if ! grep -qw /etc/ovirt-commandline.d/*; then

Thanks to Alan:  

-            if ! grep -qw /etc/ovirt-commandline.d/*; then
+            if ! grep -qw $varname /etc/ovirt-commandline.d/*; then

That's what i get for trying to get patch out before Monday Night
Football...


> +                bootparams="$bootparams $i"
> +            fi
>              ;;
>          esac
>      done





More information about the ovirt-devel mailing list