mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 04:03:01 +02:00
confd: fix json merging when generating factory config
jq -s 'add' didn't merge data, i.e.:
hostname.json:
"ietf-system:system": {
"hostname": { }
}
auth.json:
"ietf-system:system": {
"authentication": { }
}
Didn't become:
"ietf-system:system": {
"authentication": { }
"hostname": { }
}
Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
committed by
Joachim Wiberg
parent
d4333e1a8d
commit
f56ca0d0ca
@@ -10,7 +10,8 @@ PATH=/lib/infix/factory:$PATH
|
||||
gen-hostname >$FACTORY_D/20-auto-hostname.json
|
||||
gen-interfaces >$FACTORY_D/20-auto-interfaces.json
|
||||
|
||||
jq -s add $(find $FACTORY_D -name '*.json') >$CFG_D/auto-factory-config.cfg
|
||||
jq -s 'reduce .[] as $item ({}; . * $item)' $(find $FACTORY_D -name '*.json') \
|
||||
>$CFG_D/auto-factory-config.cfg
|
||||
|
||||
# TODO: Look for statically defined factory-config, based on the
|
||||
# system's product ID.
|
||||
|
||||
Reference in New Issue
Block a user