snapcore / pi-gadget

Universal pi (pi2,pi3,pi4,cm3,cm4 and future) gadget snap for Ubuntu Core and classic systems.
30 stars 60 forks source link

fix disabling of gettys to make kiosk setups work again #33

Closed ogra1 closed 4 years ago

ogra1 commented 4 years ago

somewhere along the way the hack to disable of gettys for kiosk appliances completely broke. if gettys can not be disabled on core systems mir-kiosk and the getty program fight over who owns the tty. this typically ends in mir dieing on first boot (it works on subsequent boots but in case there is a UI supposed to come up right after installation of a kiosk appliance this looks indeed very broken)

also, having login prompts at all on kiosks that you can reach by simply plugging in a kbd and switching ttys is often considered a security risk by customers.

this PR fixes the regressed behaviour of allowing to set a "nogetty" option in cmdline.txt. if the option is set it will mask the getty@tty1.service and also turn off auto-spawning of tty's in systemd. in case the option is removed from the cmdline the original behaviour is restored.

This PR also fixes the broken travis test alongside