We currently use an old version of systemd now for maintaining Webconverger services:
- Install target
- startx service
- upgrade service
Named pipes are used to block certain actions until the network is up, as documented in webc.conf.
Systemd's /lib/systemd/system/webc.service → /etc/webc/live-config.sh
/etc/webc/live-config.sh calls /etc/webc/wireless which sets up wireless networking configuration and proxy configuration. Basically things that need to be preset before networking is activated.
Once the network is setup, on a Debian system /etc/network/if-up.d is run, however in many cases in our experience only the interface is up and not the network neccessarily.
Therefore we have:
/etc/network/if-up.d/after-network-up
Which executes scripts in /etc/webc/network-up.d
live-config.sh dependencies on other Webconverger scripts: webc-id which is run from .xinitrc's webc.sh
- live-config.sh contains logic that needs to be run as root.
- webc.sh is the place where things can be run as the user.
/home/webc/.xinitrc → webc.sh
Dependencies on other Webconverger scripts: Waits for /etc/webc/id
from webc-id
These are items that can run as the webc user
Logged in /home/webc/.xerrors
Note that only the bottom loop runs between browser sessions. For settings to take effect, it's best to reboot the machine.
Boot order
- webc.sh blocks on network image
- Network setup
- webc-id has an id
- webc.sh blocks on config image, echos read into $live_config_pipe
- live-config.sh
- upgrade.sh triggered by live-config.sh
- webc.sh launches browser loop
Debugging
Append debug
on cmdline and view /var/log/syslog
. You can export logs using the log=
API