Darryl L. Pierce
2009-Apr-28 14:43 UTC
[Ovirt-devel] [PATCH node] If an invalid selection is made on the network menu, then an error
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 9a1ff2b..2dbd5da 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -263,7 +263,14 @@ else
"DNS") configure_dns "$OVIRT_DNS"; break ;;
"NTP") configure_ntp "$OVIRT_NTP"; break ;;
"Save & Exit") break 2;;
- *) configure_interface $NIC $IFACE_NUMBER; break ;;
+ *)
+ if [[ -n "${NIC}" ]] && [[
"${NICS}" =~ "${NIC}" ]]; then
+ configure_interface $NIC $IFACE_NUMBER
+ else
+ printf "\nInvalid option selected.\n"
+ fi
+ break
+ ;;
esac
done
done
--
1.6.0.6
Darryl L. Pierce
2009-Apr-29 18:59 UTC
[Ovirt-devel] Re: [PATCH node] If an invalid selection is made on the network menu, then an error
On Tue, Apr 28, 2009 at 10:43:11AM -0400, Darryl L. Pierce wrote:> > Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> > --- > scripts/ovirt-config-networking | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) > > diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking > index 9a1ff2b..2dbd5da 100755 > --- a/scripts/ovirt-config-networking > +++ b/scripts/ovirt-config-networking > @@ -263,7 +263,14 @@ else > "DNS") configure_dns "$OVIRT_DNS"; break ;; > "NTP") configure_ntp "$OVIRT_NTP"; break ;; > "Save & Exit") break 2;; > - *) configure_interface $NIC $IFACE_NUMBER; break ;; > + *) > + if [[ -n "${NIC}" ]] && [[ "${NICS}" =~ "${NIC}" ]]; then > + configure_interface $NIC $IFACE_NUMBER > + else > + printf "\nInvalid option selected.\n" > + fi > + break > + ;; > esac > done > done > -- > 1.6.0.6This was ACK'd by apevec, so I've pushed it. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Virtual Machine Management - http://www.ovirt.org/ Is fearr Gaeilge bhriste n? B?arla cliste. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090429/a93029b4/attachment.sig>