site  contact  subhomenews

More efficient handling of one-shot services

February 28, 2018 — BarryK

In the latest release of Quirky Xerus64, version 8.5, /etc/eventmanager has this line:


/etc/init.d/cups-net-fix is a service that will run after the network is up. This is handled by /etc/ at bootup.

However, 'cups-net-fix' is a "one-shot" service, just runs at startup, no daemon in it, no "stop" option. So, once started, the pup_event Service Manager is not required anymore to monitor and stop it when the network goes down.

So, I have added a bit of extra code to /etc/rc.d/ and /etc/rc.d/rc.services_ipc, to stop the Service Manager in the cases of one-shot services, after they have started. This improves efficiency.

The enhancement is explained in the latest document here, with the new code shown in dark-blue (update 180228):

For anyone who wants use this enhancement, just append "ONESHOT" to the service name in PE_SERVICE_MANAGER:


I did consider automating it, by searching for "stop)" in a service script, and if not exist then it is one-shot. However, decided that might not catch them all.

Tags: easy, quirky