Want to run a custom program before the UI starts

l3routing

New Member
Joined
Apr 18, 2021
Messages
1
Reaction score
0
Credits
15
Hi,
I'm running Raspbian 10 (buster) on Raspberry Pi B+.
I want to break the bootup sequence (anytime before control is handed off to the user) to run a custom program.

In the custom program (Calculator), I want to ask for an input (like add two numbers), if it passes, then allow the user to continue using the box.
I can add something using systemd and create a "After" directive like below.
However, what should I add to the "After" and what would I need to add to some other "Unit" to create the correct dependency.


[Unit]
Description=Calculator
After=?
 


RaspberryOS is based on systemd, so I would say that you need to run your service "After=multi-user.target", which is run right before the UI (which runs at graphical.target).

Check this nice post on the Linux boot sequence, I think it would give you the right starting point https://opensource.com/article/17/2/linux-boot-and-startup (check section systemd).
 

Members online


Top