diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2014-08-29 14:03:16 +1000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-09-04 13:58:04 +0800 |
commit | 01dac4f074301097d10abb6130eb68f99f56a1b9 (patch) | |
tree | 3f3ca975a2b579918bd8d79647e00f18f37d37d6 | |
parent | a744f086e4c16d5b286cf264a16ceca2dc23d43e (diff) | |
download | petitboot-01dac4f074301097d10abb6130eb68f99f56a1b9.zip petitboot-01dac4f074301097d10abb6130eb68f99f56a1b9.tar.gz |
discover: Reject ADD_URL actions without configured network
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | discover/device-handler.c | 6 | ||||
-rw-r--r-- | po/en.po | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index 2164b22..120f11f 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -923,6 +923,12 @@ void device_handler_process_url(struct device_handler *handler, status->detail = talloc_asprintf(status, _("Received config URL %s"), url); + if (!handler->network) { + status->message = talloc_asprintf(handler, + _("No network configured")); + goto msg; + } + event = talloc(handler, struct event); event->type = EVENT_TYPE_USER; event->action = EVENT_ACTION_CONF; @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: petitboot 20140623-g89bd2ed2-dirty\n" "Report-Msgid-Bugs-To: Geoff Levand <geoff@infradead.org>\n" -"POT-Creation-Date: 2014-08-22 11:12+1000\n" +"POT-Creation-Date: 2014-08-29 13:24+1000\n" "PO-Revision-Date: 2014-06-24 13:56+0800\n" "Last-Translator: Jeremy Kerr <jk@ozlabs.org>\n" "Language-Team: English\n" @@ -63,6 +63,9 @@ msgstr "Default boot cancelled" msgid "Received config URL %s" msgstr "Received config URL %s" +msgid "No network configured" +msgstr "No network configured" + msgid "Invalid config URL!" msgstr "Invalid config URL!" |