1
0
Commit Graph

32 Commits

Author SHA1 Message Date
7e2b0068e6 nixfmt-rfc-style
There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
2025-02-10 21:55:08 +00:00
74027b44d7 extract log persistence config from s6 to new module
because it frobs kernel config, it breaks levitate
as levitate evalModules doesn't include the kernel
2025-01-02 23:56:49 +00:00
cc94ef57fa in rc.init copy log from previous boot to place of safety 2025-01-01 18:22:45 +00:00
ffaca615ba copy logs to /dev/pmsg0 when ogging.persistent.enabled 2024-12-18 21:11:58 +00:00
81f5550bf0 config.logging.persistent enables /dev/pmsg0
- whatever's written to /dev/pmsg0 appears as
/sys/fs/pstore/pmsg-ramoops-0 after reboot

- only works on devices with the relevant device tree
support (gl-ar750 and whatever has it by default)

- nothing in the system is actually writing this file yet

- or reading it at boot time, for that matter
2024-12-17 23:24:31 +00:00
2d7e6188ac log shipping service now gets logs on stdin
instead of having to open the unix socket
2024-10-06 13:26:58 +01:00
635590d37a implement log shipping config
to use this, you need config like for example

+  logging.shipping = {
+    enable = true;
+    service = longrun {
+      name = "ship-logs";
+      run = let path = lib.makeBinPath (with pkgs; [ s6 s6-networking s6 execline ]);
+            in ''
+        PATH=${path}:$PATH
+        s6-ipcserver -1 ${config.logging.shipping.socket} \
+        s6-tcpclient 10.0.2.2 19612 \
+        fdmove -c 1 7 cat
+      '';
+    };
+  };

but I think we can reduce the noise a bit if we use an s6-rc pipeline
with an s6-ipcserver on one side and and a (whatever the user wants)
on the other
2024-09-18 22:14:34 +01:00
707a471bc2 add logtee to catchall logger 2024-09-16 21:30:06 +01:00
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
f898e4dca2 remove debug 2024-06-12 13:03:26 +01:00
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
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
dca2e4def1 fix params to s6-rc-init
flags must precede scandir otherwise they're ignored
2024-03-28 21:56:28 +00:00
3c950704e1 rename /run/service-state to /run/services/outputs 2024-02-13 21:41:43 +00:00
64898eada8 mount tmpfs on /tmp
too much stuff doesn't work without it and it's not
all worth patching
2024-01-04 23:22:02 +00:00
e518ab667b make job control work in console shell 2023-11-29 19:49:51 +00:00
3df34428d6 remove unneeded login and getty applets 2023-11-23 20:01:13 +00:00
62c788eb86 add hook to run maintenance mode instead of rebooting 2023-11-22 00:05:55 +00:00
bab6d346a8 add .../s6/bin to PATH for shutdownd 2023-11-22 00:05:03 +00:00
a202ae476a extract console redirection stuff from "quit" function
so we can use it for scripts that don't reboot at their end
2023-11-21 23:32:37 +00:00
7c9297f91d use shotdown instead of hpr in .s6-svscan/SIGFOO
this is to bring them into line with what more recent
s6-init-linux-maker creates
2023-11-21 23:19:00 +00:00
a0bd250963 switch from getty to root shell on console
this just makes things marginally simpler
2023-11-21 23:09:48 +00:00
aecbe08f08 add o+x permission on service-state directories
this is needed for resolvconf, which writes resolv.conf as
an output and wants to make it world-readable
2023-08-28 22:02:28 +01:00
e86daf9bbc default value for services.default
as a default default target, start all the services
2023-08-28 22:02:28 +01:00
99af416e14 use /bin/sh for init scripts 2023-04-19 21:41:05 +01:00
25d9da967c remove support for sockets in pseudofiles
(1) we can't make them on a real filesystem except by running
something that calls socket()
(2) whyever would we want to?
2023-04-04 23:23:22 +01:00
225fc6fe51 configurable busybox
allows modules to add to the busybox applets and change config
2023-03-10 18:40:45 +00:00
08bed15cf8 ssh service
- dropbear
- generate host keys on first use
- mount /dev/pts

It's not ideal having the host key disappear when the device is
reboot, but without persistent storage the alternative is generating
it at build time. Deferring this problem to another time
2023-03-04 12:10:06 +00:00
59ce03630a consistent ownership/permissions for /run/service-state/** 2023-02-25 22:53:06 +00:00
fe7080e75c kconfig reqd for tmpfs mount, getty baud rate to = gl-ar750 u-boot 2022-10-07 23:26:24 +01:00
5d10a9e760 rename config.environment as config.filesystem 2022-09-27 16:48:17 +01:00
797aa30c47 make s6-init-files into a module 2022-09-27 10:19:44 +01:00