localization: locale, time zone and console keymap as one module
One machine ran another time zone and a German console keymap with no record why. The module writes /etc/locale.conf and /etc/vconsole.conf whole and sets the zone through a run-once step of its own Go binary (timedatectl, read back): /etc/localtime is a link the mesh may not write (hq ADR 0012) and a module may not declare an action (ADR 0005). Tools: localization_get, _time_zone, _locales, _keymaps (to-be 42 Phase 1).
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"module": "localization",
|
||||
"version": "1",
|
||||
"capabilities": [
|
||||
"service-manager"
|
||||
],
|
||||
"tools": [
|
||||
"localization_get",
|
||||
"localization_time_zone",
|
||||
"localization_locales",
|
||||
"localization_keymaps"
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"id": "locale",
|
||||
"type": "file",
|
||||
"path": "/etc/locale.conf",
|
||||
"mode": "0644",
|
||||
"content": "# The mesh's (module localization, novox/hq to-be 42): the system locale. Written whole at every\n# push; an edit here is overwritten. Read at the next login.\nLANG=en_US.UTF-8\n"
|
||||
},
|
||||
{
|
||||
"id": "keymap",
|
||||
"type": "file",
|
||||
"path": "/etc/vconsole.conf",
|
||||
"mode": "0644",
|
||||
"content": "# The mesh's (module localization, novox/hq to-be 42): the console keymap. Written whole at every\n# push; an edit here is overwritten. Read at the next boot.\nKEYMAP=us\n"
|
||||
},
|
||||
{
|
||||
"id": "time-zone",
|
||||
"type": "process",
|
||||
"name": "localization-time-zone",
|
||||
"artifact": "tools",
|
||||
"run": [
|
||||
"./localization-tools",
|
||||
"set-time-zone",
|
||||
"Europe/Brussels"
|
||||
],
|
||||
"run-once": true
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
"name": "tools",
|
||||
"kind": "bundle",
|
||||
"language": "go",
|
||||
"system": "arch",
|
||||
"from": "cmd/localization-tools",
|
||||
"binary": "localization-tools",
|
||||
"loads": [
|
||||
"localization-tools"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user