Skip to contentSkip to conversation

defaultenv: bin: init: Add sourcing of config-expansions

PATCH In review Daniel Schultz 2 participants 5 messages Jun 13, 2017 – Jun 27, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 defaultenv: bin: init: Add sourcing of config-expansions

This patch adds a further layer to the config hierarchy. It allows a dynamic configuration of expansions.

---
 defaultenv/defaultenv-2-base/bin/init | 1 +
 1 file changed, 1 insertion(+)
defaultenv/defaultenv-2-base/bin/init +1 -0
index 7af3c7d..a93ea58 100644
@@ -25,6 +25,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
 [ -z "${global.editcmd}" ] && global.editcmd=sedit
 
 [ -e /env/config-board ] && /env/config-board
+[ -e /env/config-expansions ] && /env/config-expansions
 /env/config
 
 # allow to stop the boot before execute the /env/init/*
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 13 lines · Daniel Schultz

This patch adds a further layer to the config hierarchy. It allows a dynamic configuration of expansions.

---
 defaultenv/defaultenv-2-base/bin/init | 1 +
 1 file changed, 1 insertion(+)
defaultenv/defaultenv-2-base/bin/init +0 -0
index 7af3c7d..a93ea58 100644

defaultenv/defaultenv-2-base/bin/init magicvar -a global.allow_color "Allow color on the console (boolean)" · line 28

Quoted 4 lines
defaultenv/defaultenv-2-base/bin/init +1 -0
@@ -25,6 +25,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
 [ -z "${global.editcmd}" ] && global.editcmd=sedit
 
 [ -e /env/config-board ] && /env/config-board
+[ -e /env/config-expansions ] && /env/config-expansions

I read the last thread again and I think my question remains unanswered. Why can't you put the config-expansions to /env/init/ and let it be executed automatically without changing /bin/init?

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hi,

Am 19.06.2017 um 09:34 schrieb Sascha Hauer:

Quoted 16 lines · Daniel Schultz
Quoted 15 lines

This patch adds a further layer to the config hierarchy. It allows a dynamic configuration of expansions.

---
  defaultenv/defaultenv-2-base/bin/init | 1 +
  1 file changed, 1 insertion(+)
defaultenv/defaultenv-2-base/bin/init +0 -0
index 7af3c7d..a93ea58 100644
@@ -25,6 +25,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
  [ -z "${global.editcmd}" ] && global.editcmd=sedit
 
Quoted 7 lines

defaultenv/defaultenv-2-base/bin/init magicvar -a global.allow_color "Allow color on the console (boolean)" · line 28

Quoted 2 lines
defaultenv/defaultenv-2-base/bin/init +1 -0
  [ -e /env/config-board ] && /env/config-board
+[ -e /env/config-expansions ] && /env/config-expansions

I read the last thread again and I think my question remains unanswered. Why can't you put the config-expansions to /env/init/ and let it be executed automatically without changing /bin/init?

I can change the path of the config-expanions file without problems, but I thought there could be more who need a config for expansions. So, they have config files with a same behavior in different dirs.

Signature · 8 lines
Mit freundlichen Grüßen,
With best regards,
  Daniel Schultz

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 25 lines · Daniel Schultz

Hi,

Am 19.06.2017 um 09:34 schrieb Sascha Hauer:

Quoted 9 lines · Daniel Schultz
Quoted 8 lines

This patch adds a further layer to the config hierarchy. It allows a dynamic configuration of expansions.

---
  defaultenv/defaultenv-2-base/bin/init | 1 +
  1 file changed, 1 insertion(+)
Quoted 13 lines

defaultenv/defaultenv-2-base/bin/init magicvar -a global.allow_color "Allow color on the console (boolean)" · line 27

Quoted 8 lines
defaultenv/defaultenv-2-base/bin/init +1 -0
index 7af3c7d..a93ea58 100644
@@ -25,6 +25,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
  [ -z "${global.editcmd}" ] && global.editcmd=sedit
  [ -e /env/config-board ] && /env/config-board
+[ -e /env/config-expansions ] && /env/config-expansions

I read the last thread again and I think my question remains unanswered. Why can't you put the config-expansions to /env/init/ and let it be executed automatically without changing /bin/init?

Quoted 3 lines

I can change the path of the config-expanions file without problems, but I thought there could be more who need a config for expansions. So, they have config files with a same behavior in different dirs.

I think we are talking at cross-purposes. All files in /env/init/ are executed by the init script, so adding stuff that shall be executed during init to that directory would be the natural way to "expand the config".

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

Hi,

Am 26.06.2017 um 08:25 schrieb Sascha Hauer:

Quoted 26 lines · Daniel Schultz
Quoted 25 lines

Hi,

Am 19.06.2017 um 09:34 schrieb Sascha Hauer:

Quoted 22 lines · Daniel Schultz
Quoted 13 lines

This patch adds a further layer to the config hierarchy. It allows a dynamic configuration of expansions.

---
   defaultenv/defaultenv-2-base/bin/init | 1 +
   1 file changed, 1 insertion(+)
defaultenv/defaultenv-2-base/bin/init +0 -0
index 7af3c7d..a93ea58 100644

defaultenv/defaultenv-2-base/bin/init magicvar -a global.allow_color "Allow color on the console (boolean)" · line 27

Quoted 3 lines
defaultenv/defaultenv-2-base/bin/init +1 -0
@@ -25,6 +25,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
   [ -z "${global.editcmd}" ] && global.editcmd=sedit
   [ -e /env/config-board ] && /env/config-board
+[ -e /env/config-expansions ] && /env/config-expansions

I read the last thread again and I think my question remains unanswered. Why can't you put the config-expansions to /env/init/ and let it be executed automatically without changing /bin/init?

Quoted 9 lines
Quoted 3 lines

I can change the path of the config-expanions file without problems, but I thought there could be more who need a config for expansions. So, they have config files with a same behavior in different dirs.

I think we are talking at cross-purposes. All files in /env/init/ are executed by the init script, so adding stuff that shall be executed during init to that directory would be the natural way to "expand the config".

Okay, so I misunderstood you. I will add all config-expansions to /env/init, sorry!

Quoted 2 lines

Sascha

Signature · 8 lines
Mit freundlichen Grüßen,
With best regards,
  Daniel Schultz

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox