On all my Bookworm systems I see that the rc.local service DOES run at boot time (journalctl -b | grep rc.local) but regardless of your current systemd issue, rc.local isn't necessarily as predictable as using a systemd service.
I'm not aware of a systemd service that you could wait for re the i2c, but rather than 'After=network.target' you could try 'After=default.target multi-user.target' which will cause your service to not start until multi-user.target has been achieved. That **might** be late enough in the boot process.
And, if that doesn't work you could build a delay by using ExecStartPre=/path/to/delay-script where the delay-script waits for /dev/i2c-1 to be available. Thinking about it as I'm typing, this is probably the best way?
I'm not aware of a systemd service that you could wait for re the i2c, but rather than 'After=network.target' you could try 'After=default.target multi-user.target' which will cause your service to not start until multi-user.target has been achieved. That **might** be late enough in the boot process.
And, if that doesn't work you could build a delay by using ExecStartPre=/path/to/delay-script where the delay-script waits for /dev/i2c-1 to be available. Thinking about it as I'm typing, this is probably the best way?
Statistics: Posted by bls — Wed Feb 28, 2024 2:19 pm