Commit Graph

359 Commits

Author SHA1 Message Date
Daniel Barlow 54d3415885 pppoe convert to using a config file
mostly for ease of implementation but does mean we don't
have username/password secrets on the command line
2024-08-20 22:55:30 +01:00
Daniel Barlow 264d83c98d move some secret-watching stuff from hostapd to secrets 2024-08-20 21:49:11 +01:00
Daniel Barlow 97defc2076 hostapd: get secrets service/path from attrs 2024-08-17 22:25:30 +01:00
Daniel Barlow bcd9d56624 start devout after mdevd
not 100% sure that there's a dependency but it's plausible, and
would explain the observed occasional failure to start at boot
2024-08-15 23:01:29 +01:00
Daniel Barlow e2c883356c add secrets-subscriber service, make hostapd use it 2024-08-15 23:00:41 +01:00
Daniel Barlow 2f82e0dab8 hostapd set permissions on dir in /run/ 2024-08-14 22:57:02 +01:00
Daniel Barlow fc03965915 hostapd literal_or_output use an attrset for dispatch 2024-08-14 22:56:01 +01:00
Daniel Barlow d2d3af2587 outboard secrets: loop in service
if we just quit and expect s6 to restart us, the finish script
wipes our outputs and anything with an inotify watch gets confused
2024-08-14 22:41:56 +01:00
Daniel Barlow 4fb8253e57 first pass at outboard secrets
- a module to fetch them with http(s)
- a service using templating to consume them
- update an example to use it

needs service restarts
needs other services to use the template mechanism
needs tidying up
2024-08-12 22:57:21 +01:00
Daniel Barlow 5db9d7269e ppoe structured options are optional 2024-08-06 18:43:27 +01:00
Daniel Barlow c4d00e062a add health check service and example that uses it 2024-07-30 22:37:43 +01:00
Daniel Barlow 39020607ad rename service-trigger rule to match service name 2024-07-28 22:35:37 +01:00
Daniel Barlow fe735408a1 v:address is nil if missing, but code expects an array 2024-07-27 17:40:32 +01:00
Daniel Barlow a9d1582b53 remove unused arg 2024-07-26 23:41:50 +01:00
Daniel Barlow 28ca1e68ab wwan module needs mdevd 2024-07-23 09:31:34 +01:00
Daniel Barlow 7f9cae9d5c generalise profile.gateway.wan so not just pppoe 2024-07-23 09:31:34 +01:00
Daniel Barlow 7195cb10ce add structured config for common pppoe options 2024-07-23 09:31:34 +01:00
Daniel Barlow 3899daee56 create a module for round-robin 2024-07-15 22:37:37 +01:00
Daniel Barlow b17f623d03 need insmod when we habve kmodloader 2024-07-15 22:35:26 +01:00
Daniel Barlow df395a4d5d finish moving pkgs.linimix.callService to config.system 2024-07-15 19:00:08 +01:00
Daniel Barlow 725d8b608f huawei-cdc-ncm kernel driver -> module 2024-07-14 12:07:28 +01:00
Daniel Barlow 73ae7788b9 rename wwan-related modules/services
we only currently support huawei e3372/cdc ncm so let's make that
explicit in the naming
2024-07-14 11:53:45 +01:00
Daniel Barlow 3f8cc24dcc fix most doc warnings 2024-07-10 23:36:24 +01:00
Daniel Barlow ac551536da set cwd before exec xl2tpd 2024-07-08 21:56:26 +01:00
Daniel Barlow 6f908156af fix dependency between modem-atz and modeswitch
for values of "fix" more than slightly reminiscent of "kludge"
2024-07-08 21:55:05 +01:00
Daniel Barlow 07a6eb73cd set lcp-echo timeout in l2tp 2024-07-08 21:45:54 +01:00
Daniel Barlow 159bfa3057 make xl2tpd quit when the connections close 2024-07-08 21:44:15 +01:00
Daniel Barlow 143137cbc6 pppoe: set lcp echo failure timeout 2024-07-08 21:25:42 +01:00
Daniel Barlow 8d228f2bef mess with redial 2024-07-08 21:24:44 +01:00
Daniel Barlow 8b6aa2134e zyxel dual image; restore deleted params 2024-06-30 17:50:45 +01:00
Daniel Barlow 3df1ec76ff cleanup whitespace and commas
* [] is now [ ]
* {} is now { }
* commas in arglists go at end of line not beginning

In short, I ran the whole thing through nixfmt-rfc-style but only
accepted about 30% of its changes. I might grow accustomed to more
of it over time
2024-06-30 17:16:28 +01:00
Daniel Barlow e94bf62ec1 remove dead code (run deadnix) 2024-06-29 22:59:27 +01:00
Daniel Barlow d4d8093f97 working l2tp-over-wwan stick example 2024-06-20 10:15:54 +01:00
Daniel Barlow 7c9c801afc rename isTrigger to restart-on-upgrade
we're moving away from "trigger" services to "controller" services,
and "restart-on-upgrade" is the name used by s6-rc
2024-06-16 12:58:06 +01:00
Daniel Barlow 06d28e9b08 dhcpc handle case when env vars are missing
the notify-script should continue and signal readiness even if one or
more of the outputs it writes are mssing in the environment
2024-06-15 15:34:49 +01:00
Daniel Barlow adc84108ad Revert "wwan gets address from ppp ipcp not dhcp"
This reverts commit be13ab23ca.
2024-06-15 15:04:33 +01:00
Daniel Barlow eae99051fa exec devout in service definition
makes little practical difference but saves a process slot
2024-06-15 15:01:57 +01:00
Daniel Barlow 49d1703428 add s6-rc-up-tree: start reverse deps of controlled service
When s6-rc stops a service, it also stops everything that
depends on it. but when it starts a service it starts only
that service, so we have to go through the other services
depending on it and figure out if they should be started too.
2024-06-15 14:59:34 +01:00
Daniel Barlow f898e4dca2 remove debug 2024-06-12 13:03:26 +01:00
Daniel Barlow 5121a8563d callService: dependencies are services not names 2024-06-12 12:58:57 +01:00
Daniel Barlow be13ab23ca wwan gets address from ppp ipcp not dhcp 2024-06-12 12:51:07 +01:00
Daniel Barlow b15542b668 start correct services at boot
- uncontrolled services that are not dependent on a controlled service
- controllers
- _not_ controlled services or any other service that depends on one
2024-06-11 14:04:14 +01:00
Daniel Barlow 6daeaf29a0 flip controller/controlled relationship for wwan services 2024-06-11 14:02:48 +01:00
Daniel Barlow e6e4665a18 flip dependencies for triggered/controlled services
Instead of treating the trigger as the "main" service and the
triggered service as subsidary, now we treat the triggered
service as the service and the trigger as "subsidary". This
needs some special handling when we work out which services
go in the default bundle, but it works better for declaring
dependencies on triggered services because it means the
dependency runs after the triggered service comes up, not
just when the watcher-for-events starts
2024-06-09 22:37:45 +01:00
Daniel Barlow c8c79fd75a update all calls to uevent-watch 2024-06-02 20:42:09 +01:00
Daniel Barlow 884d8d194e wrap uevent-watch in a service 2024-06-02 20:42:09 +01:00
Daniel Barlow 37d7e20582 wwan use uevent-watch to find tty for AT commands 2024-06-01 23:47:20 +01:00
Daniel Barlow e0bd7aec1e wwan: hook usb-modeswitch to uevent 2024-05-26 18:03:32 +01:00
Daniel Barlow 898958fa10 make a serviceDefn for wwan 2024-05-22 18:54:49 +01:00
Daniel Barlow fa0f262706 commentary 2024-05-22 18:54:49 +01:00