* [PATCH 1/1] defaultenv-2: move settings in a submenu
@ 2012-09-25 1:43 Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-25 1:43 UTC (permalink / raw)
To: barebox
To be more clear
so on the mainmenu we will just have
- the boot option
- settings
- shell
- reset
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv-2/menu/menu/mainmenu | 5 +----
| 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
create mode 100644 defaultenv-2/menu/menu/settings
diff --git a/defaultenv-2/menu/menu/mainmenu b/defaultenv-2/menu/menu/mainmenu
index 5bd7027..f10f67a 100644
--- a/defaultenv-2/menu/menu/mainmenu
+++ b/defaultenv-2/menu/menu/mainmenu
@@ -14,10 +14,7 @@ while true; do
boot-entries-collect
- menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
- menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
- menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
- menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
+ menu -e -a -m boot -c "settings" -d "Settings"
menu -e -a -m boot -c 'PATH=$savepath; echo "enter exit to return to menu"; sh' -d "${DARK_YELLOW}Shell${NC}"
menu -e -a -m boot -c reset -d "${RED}Reset${NC}"
--git a/defaultenv-2/menu/menu/settings b/defaultenv-2/menu/menu/settings
new file mode 100644
index 0000000..3f84b03
--- /dev/null
+++ b/defaultenv-2/menu/menu/settings
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+export menu_exit=false
+
+while true; do
+ menu -a -m settings -d "${CYAN}Settings${NC}"
+
+ menu -e -a -R -m settings -c "$global.editcmd /env/network/eth0" -d "Network settings"
+
+ menu -e -a -m settings -c "boot-entries-edit" -d "Edit boot entries"
+ menu -e -a -m settings -c "init-entries-edit" -d "Edit init entries"
+ menu -e -a -R -m settings -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
+ menu -e -a -m settings -c "menu_exit=true" -d "back"
+
+ menu -s -m settings
+ menu -r -m settings
+
+ if [ $menu_exit = true ]; then
+ exit
+ fi
+done
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] defaultenv-2: move settings in a submenu
@ 2013-03-12 20:48 Jean-Christophe PLAGNIOL-VILLARD
2013-03-15 7:24 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-03-12 20:48 UTC (permalink / raw)
To: barebox
To be more clear
so on the mainmenu we will just have
- the boot option
- settings
- shell
- reset
when starting to have a long list of boot option the menu start to be big
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv-2/menu/menu/mainmenu | 6 +-----
| 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 5 deletions(-)
create mode 100644 defaultenv-2/menu/menu/settings
diff --git a/defaultenv-2/menu/menu/mainmenu b/defaultenv-2/menu/menu/mainmenu
index abd6c46..12c5554 100644
--- a/defaultenv-2/menu/menu/mainmenu
+++ b/defaultenv-2/menu/menu/mainmenu
@@ -18,11 +18,7 @@ while true; do
boot-entries-collect
- menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
- menu -e -a -R -m boot -c "$global.editcmd /env/config" -d "Config settings"
- menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
- menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
- menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
+ menu -e -a -m boot -c "settings" -d "Settings"
menu -e -a -m boot -c 'PATH=$savepath; echo "enter exit to return to menu"; sh' -d "${DARK_YELLOW}Shell${NC}"
menu -e -a -m boot -c reset -d "${RED}Reset${NC}"
--git a/defaultenv-2/menu/menu/settings b/defaultenv-2/menu/menu/settings
new file mode 100644
index 0000000..3b95d4c
--- /dev/null
+++ b/defaultenv-2/menu/menu/settings
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+export menu_exit=false
+
+while true; do
+ menu -a -m settings -d "${CYAN}Settings${NC}"
+
+ menu -e -a -R -m settings -c "$global.editcmd /env/network/eth0" -d "Network settings"
+ menu -e -a -R -m settings -c "$global.editcmd /env/config" -d "Config settings"
+ menu -e -a -m settings -c "settings-entries-edit" -d "Edit settings entries"
+ menu -e -a -m settings -c "init-entries-edit" -d "Edit init entries"
+ menu -e -a -R -m settings -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
+ menu -e -a -m settings -c "menu_exit=true" -d "back"
+
+ menu -s -m settings
+ menu -r -m settings
+
+ if [ $menu_exit = true ]; then
+ exit
+ fi
+done
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] defaultenv-2: move settings in a submenu
2013-03-12 20:48 Jean-Christophe PLAGNIOL-VILLARD
@ 2013-03-15 7:24 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2013-03-15 7:24 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Tue, Mar 12, 2013 at 09:48:39PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> To be more clear
>
> so on the mainmenu we will just have
> - the boot option
> - settings
> - shell
> - reset
>
> when starting to have a long list of boot option the menu start to be big
Applied, thanks
Sascha
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> defaultenv-2/menu/menu/mainmenu | 6 +-----
> defaultenv-2/menu/menu/settings | 21 +++++++++++++++++++++
> 2 files changed, 22 insertions(+), 5 deletions(-)
> create mode 100644 defaultenv-2/menu/menu/settings
>
> diff --git a/defaultenv-2/menu/menu/mainmenu b/defaultenv-2/menu/menu/mainmenu
> index abd6c46..12c5554 100644
> --- a/defaultenv-2/menu/menu/mainmenu
> +++ b/defaultenv-2/menu/menu/mainmenu
> @@ -18,11 +18,7 @@ while true; do
>
> boot-entries-collect
>
> - menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
> - menu -e -a -R -m boot -c "$global.editcmd /env/config" -d "Config settings"
> - menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
> - menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
> - menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
> + menu -e -a -m boot -c "settings" -d "Settings"
> menu -e -a -m boot -c 'PATH=$savepath; echo "enter exit to return to menu"; sh' -d "${DARK_YELLOW}Shell${NC}"
> menu -e -a -m boot -c reset -d "${RED}Reset${NC}"
>
> diff --git a/defaultenv-2/menu/menu/settings b/defaultenv-2/menu/menu/settings
> new file mode 100644
> index 0000000..3b95d4c
> --- /dev/null
> +++ b/defaultenv-2/menu/menu/settings
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +export menu_exit=false
> +
> +while true; do
> + menu -a -m settings -d "${CYAN}Settings${NC}"
> +
> + menu -e -a -R -m settings -c "$global.editcmd /env/network/eth0" -d "Network settings"
> + menu -e -a -R -m settings -c "$global.editcmd /env/config" -d "Config settings"
> + menu -e -a -m settings -c "settings-entries-edit" -d "Edit settings entries"
> + menu -e -a -m settings -c "init-entries-edit" -d "Edit init entries"
> + menu -e -a -R -m settings -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
> + menu -e -a -m settings -c "menu_exit=true" -d "back"
> +
> + menu -s -m settings
> + menu -r -m settings
> +
> + if [ $menu_exit = true ]; then
> + exit
> + fi
> +done
> --
> 1.7.10.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-15 7:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 1:43 [PATCH 1/1] defaultenv-2: move settings in a submenu Jean-Christophe PLAGNIOL-VILLARD
2013-03-12 20:48 Jean-Christophe PLAGNIOL-VILLARD
2013-03-15 7:24 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox