feat(mesh): integrate MeshPort/EasyTier P2P mesh network with NetworkManager auto-connect
Offline project checks / check (push) Canceled after 0s

- Add platina-mesh CLI (scripts/phone-mesh.py) for status inspection, control, and JSON telemetry.
- Add OpenRC service (scripts/phone-mesh.openrc) for managing easytier-core daemon.
- Add NetworkManager dispatcher hook (scripts/phone-mesh-dispatcher.sh) to automatically start mesh when external default route is active and stop when disconnected.
- Add default mesh configuration (scripts/easytier.conf) with node identity Platina (192.168.20.10).
- Integrate mesh runtime into image overlay builder (scripts/image-runtime.py).
- Add unit tests for mesh control and image runtime integration (142 tests passing).
This commit is contained in:
shenlei
2026-11-10 09:50:00 +09:00
parent 2a9ec1e1d6
commit 139bb1fc21
7 changed files with 375 additions and 1 deletions
+11 -1
View File
@@ -27,9 +27,13 @@ HELPERS = {
'scripts/phone-usb-power.py': 'usr/local/sbin/platina-usb-power',
'scripts/phone-usb-power-dispatcher.sh': 'etc/NetworkManager/dispatcher.d/90-platina-usb-power',
'scripts/phone-cellular-setup.py': 'usr/local/sbin/platina-cellular',
'scripts/phone-mesh.py': 'usr/local/sbin/platina-mesh',
'scripts/phone-mesh.openrc': 'etc/init.d/easytier',
'scripts/phone-mesh-dispatcher.sh': 'etc/NetworkManager/dispatcher.d/95-platina-mesh',
'scripts/image-runtime.py': 'usr/local/libexec/platina-image-runtime',
}
CONFIG = 'etc/conf.d/platina-power-chord'
MESH_CONFIG = 'etc/easytier/easytier.conf'
def layout(version):
@@ -38,18 +42,21 @@ def layout(version):
base = 'usr/local/share/platina/releases/' + version
modes = {name: 0o755 for name in HELPERS.values()}
modes[CONFIG] = 0o644
modes[MESH_CONFIG] = 0o644
for sub in ('', 'poweroff/'):
for name in ('release.json', 'version', 'frame.bgrx.gz'):
modes[base + '/' + sub + name] = 0o644
links = {'usr/local/share/platina/current': 'releases/' + version,
'etc/platina-release': '../usr/local/share/platina/current/version',
'etc/runlevels/default/platina-power-chord': '../../init.d/platina-power-chord',
'etc/runlevels/default/platina-battery-guard': '../../init.d/platina-battery-guard'}
'etc/runlevels/default/platina-battery-guard': '../../init.d/platina-battery-guard',
'etc/runlevels/default/easytier': '../../init.d/easytier'}
return base, modes, links
def source_inputs():
names = list(HELPERS) + ['scripts/phone-power-chord.conf',
'scripts/easytier.conf',
'scripts/platina-release.py', 'project/release.json',
'project/branding/platina-linux-logo.png',
'project/branding/provenance.json']
@@ -138,6 +145,9 @@ def prepare(output):
dest = stage / CONFIG
dest.parent.mkdir(parents=True, exist_ok=True)
dest.write_bytes(conf.replace(b'dry_run=yes\n', b'dry_run=no\n'))
dest_mesh = stage / MESH_CONFIG
dest_mesh.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(ROOT / 'scripts/easytier.conf', dest_mesh)
for sub in ('', 'poweroff/'):
for name in ('release.json', 'version', 'frame.bgrx.gz'):
dest = stage / base / sub / name