Mike Burns
2011-Sep-12 23:16 UTC
[Ovirt-devel] [PATCH node] handle list of variables to ignore
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 + bootparams="$bootparams $i" + fi ;; esac done -- 1.7.4.4
Mike Burns
2011-Sep-13 10:55 UTC
[Ovirt-devel] [PATCH node] handle list of variables to ignore
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/*; thenThanks 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