
On Sat, 19 Feb 2022 07:59:36 +0000, Warren Boyd wrote:
Could these not also have gone into the relevant scripts for SysV or init.d startups?
Which ones?
Init.d: Create a script: ``` #!/bin/bash # chkconfig: 2345 # description: Set the battery charge threshold start() { echo 50 > /sys/class/power_supply/BAT0/charge_control_end_threshold } case "$1" in start) start ;; stop) restart) ;; *) echo "Usage: $0 {start|stop|restart}" esac exit 0 ``` And then add it to the system using `chkconfig` SysV - it could be as brutal as adding `echo 50 > /sys/class/power_supply/BAT0/charge_control_end_threshold &` as an extra line into /etc/rc.local I'm just trying to gauge how systemd makes this an easy customization of the system compared to what came before it. I'll concede that the script for systemd is a lot more readable - so perhaps that in its entirety is a win? Cheers!