Tobias Waldekranz
00c93cd70c
mech: Initial ietf-system support
...
Only hostname is supported for now.
2023-02-10 16:11:34 +01:00
Tobias Waldekranz
3d35194341
mech: Add infrastructure for backend plugins using Augeas
2023-02-10 16:11:34 +01:00
Tobias Waldekranz
3235f00cd1
mech: Import basic autocli support from clixon's main example
...
This allows use the autogenerated CLI to modify the database.
2023-02-10 16:11:34 +01:00
Tobias Waldekranz
e56348a916
mech: Make startup_db persistent, prepare for factory configs
...
Keep the transient files in the system's /mnt/tmp, and only persist
startup_db in /cfg.
This design (with a symlink) means that /cfg/startup_db _must_ exist
in order for clixon to start properly. Therefore run
/lib/infix/prep-db to take care of this.
At the moment, this just creates an empty factory config, and copies
it to startup if it doesn't exist. In the future, prep-db could select
a factory config based on some hardware identifier, or even build one
dynamically, based on available ports etc.
2023-02-10 15:51:47 +01:00
Tobias Waldekranz
5a27b30c7c
mech: Startup clixon at boot
2023-02-09 10:26:10 +01:00
Tobias Waldekranz
61213c7c3c
sshd: Move hostkeys to /var/lib/ssh
...
This means keys are persistent even when /etc is not.
2023-02-09 10:26:10 +01:00
Tobias Waldekranz
fbd68c4a65
qemu: Let user supply extra append options
2023-02-09 10:26:10 +01:00
Tobias Waldekranz
66688b4e5a
board/common: mnt: Fix boot/etc detection
...
Previously, the absense of any finit boot conditions would be
interpreted as unmanaged mode, but managed should be the default.
2023-02-09 10:26:10 +01:00
Tobias Waldekranz
d7c83cb9a7
board/common: Make it easier to access the CLI
...
- Create a shell alias, 'cli'
- Add an sshd subsystem, 'cli'
2023-02-09 10:26:10 +01:00
Tobias Waldekranz
3036b08945
board/common: Split out iface renaming from swup
...
The factory config part of swup will now only run when in unmanaged
mode.
2023-02-09 09:43:15 +01:00
Tobias Waldekranz
437961a644
board/common: Keep static /etc/iproute2/group
...
This way we don't have to patch it at every boot.
2023-02-09 09:43:15 +01:00
Tobias Waldekranz
fa4a83e38d
board/common: Keep our own dhcpcd.conf
...
This avoids the issue where the config file keeps growing as more
"background" lines are appended to it with each build.
2023-02-09 09:43:15 +01:00
Tobias Waldekranz
16af6f9622
board/common: Remove remnants of dropbear key generation
2023-02-09 09:43:15 +01:00
Tobias Waldekranz
7740baf796
Revert "board/common: enable NETCONF over SSH"
...
This reverts commit 2ddf9448fe .
Two reasons:
1. We will move to a debian-style /etc/ssh/ssh_config.d/ structure
soon.
2. In a managed scenario, NETCONF could be disabled, so mech should be
responsible for activating it at boot.
2023-02-09 09:43:15 +01:00
Joachim Wiberg
7bfb0a9478
Follow-up to 252feef: rename Orc to Mech everywhere
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 15:12:57 +01:00
Joachim Wiberg
f75842ab8b
src/mech: update socket group s/clixon/clicon/
...
Recommended group according to Clixon FAQ
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:55:03 +01:00
Joachim Wiberg
8f82d24724
board/common: add clicon user according to FAQ
...
https://github.com/clicon/clixon/blob/master/doc/FAQ.md#do-i-need-to-setup-anything
With the additional wheel group for the clicon user since our plugins
need to modify files in /etc at bootstrap and reconf.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:47 +01:00
Joachim Wiberg
2ddf9448fe
board/common: enable NETCONF over SSH
...
The allows remote NETCONF access to the Clixon example (for now). This
will be replaced later with the Clixon Infix system.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:03 +01:00
Joachim Wiberg
83b3a1b1cc
board/common: follow-up to 91b40a1, fix bridge access ports
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:03 +01:00
Joachim Wiberg
6de17bb06a
board/common: follow-up to 4ca58836b, let less be less
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:03 +01:00
Joachim Wiberg
8fe9e87550
patches/clixon: adjust paths to PID file and XML db store
...
- Use the more common .pid format for the PID file
- Use an existing directory for the XML db, /var/lib/misc
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:03 +01:00
Joachim Wiberg
58c2ee159c
package/clixon: fix misspelled BR2 variables in clixon.mk
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:53:01 +01:00
Joachim Wiberg
e5545f1d27
Add licensing information, GPL like Buildroot
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:52:19 +01:00
Joachim Wiberg
e5032e1835
board/common: minor shellcheck fixes to mnt script
...
- Double quoting to prevent word splitting
- local keyword is undefined in POSIX sh
- `-m 0755` only applies to deepest directory (ignore)
- Useless cat
- Redirect to null, lilke the other mount_rw statements
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-08 14:52:19 +01:00
Tobias Waldekranz
252feef1c4
mech: Initial add
...
The mechanic, Infix's integration layer to Clixon
2023-02-08 14:05:47 +01:00
Tobias Waldekranz
f8b32fb1be
package/clixon: Fix default config file location
...
The comment in the makefile says it all.
With this in place, we can start clixon_{backend,cli,...} without any
arguments.
2023-02-08 14:05:47 +01:00
Joachim Wiberg
41737b2343
package/clixon: new package
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-07 19:12:40 +01:00
Joachim Wiberg
aa9a986d4b
package/cligen: new package
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-07 19:12:40 +01:00
Tobias Waldekranz
ca1467736f
common: Refactor persistent storage setup
...
In the new model, we have three sources of storage:
- /mnt/var: Mountpoint for a disk with the label "var"
- /mnt/cfg: Mountpoint for a disk with the label "cfg"
- /mnt/tmp: Mountpoint for a ramdisk
These sources are used for the following overlays:
- **/cfg, /home, /root**: /mnt/cfg if available, else /mnt/tmp
- **/etc**: /mnt/cfg if available and the boot/etc finit condition is
set, else /mnt/tmp
- **/var**: /mnt/var if available, else /mnt/tmp
- **/var/lib**: /mnt/var if available, else /mnt/cfg if available,
else /mnt/tmp
See board/common/rootfs/lib/infix/mnt for more information.
2023-02-07 15:42:35 +01:00
Joachim Wiberg
5ec019f97a
Add link to GitHub Releases page
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-06 08:48:53 +01:00
Joachim Wiberg
17692eb250
package/sysrepo-plugin-system: new package
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 13:50:25 +01:00
Joachim Wiberg
f4c1f48d04
package/sysrepo-plugins-common: new package
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 13:14:42 +01:00
Joachim Wiberg
baa0d77598
package/umgmt: new package
...
Required by upcoming package sysrepo-plugin-system by Deutsche Telekom.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 12:38:50 +01:00
Joachim Wiberg
ad22478866
board/common: allow full color output in setup tool
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:46:05 +01:00
Joachim Wiberg
326f2024d7
board/common: use plain view of log files in setup tool
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:46:02 +01:00
Joachim Wiberg
31d036c8c7
board/common: very basic 'setup' tool, also works as login shell
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
8525f26137
board/common: fix show formatting in '-p' (plain output) mode
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
0d9a218d95
board/common: add '-p' (plain output) to help command
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
8b263f2766
board/common: add template /etc/mactab, syntax reminder only
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
92ce79bc7a
board/common: add simple 'hostnm' script to change system hostname
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
b313096745
board/common: add '-p' option to help script for plain/noansi output
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
81698b17a1
board/common: update and fix show script for plain/noansi output
...
Also, the "show port foo" didn't work.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:36 +01:00
Joachim Wiberg
c4f40a49c7
board/common: ensure port+iface group is assigned in factory defaults
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-02-01 08:35:33 +01:00
Joachim Wiberg
4ca58836b4
board/common: replace edit and editor with symlink to nano
...
The nano editor has been shown, over and over again, to be more
user-friendly to complete UNIX/Linux beginners than even Mg.
Also, change the default pager/less to be less (again), it was
very confusing to have less be most and more just be more. We
recommend scripts to use pager and edit/editor to call system
safe defaults.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 21:45:32 +01:00
Joachim Wiberg
70b725baec
board/common: some helpful hints on port classification and NAT
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 20:03:59 +01:00
Joachim Wiberg
5ab09ccad0
Demo issues fixed
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 12:35:39 +01:00
Joachim Wiberg
11e96318ef
board/common: make rc.local executable, not called otherwise
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 12:35:39 +01:00
Joachim Wiberg
d100f27585
board/common: import default sysctl.conf from Debian
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 12:35:39 +01:00
Joachim Wiberg
a1c5e8b33f
board/common: drop ifupdown2 defaults, not used anymore
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 12:25:58 +01:00
Joachim Wiberg
2e62e0d655
package/ifupdown-ng: fix overlayfs issue (DT_REG)
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-01-31 11:35:24 +01:00