Skip to content

Fix enabling and disabling autostart

Matti Viljanen requested to merge fix-autostart-controls into master

Use GetUnitFileState instead of GetUnit, because GetUnit only succeeds if the unit is already enabled. GetUnitFileState responds either "enabled" or "disabled" depending of the state, and fails if the service doesn't exist.

Tested with and without Sailjail on Xperia X10III at 4.4.0.68, also with "clean" install (e.g. no *whisperfish.service files present in the system before installation). I should note that disabling the service while running the started-up-on-boot "service window" doesn't close Whisperfish, so we're good.

@gamarg Would you have a look at this, too?

Merge request reports

Loading