El 27/09/13 04:26, Muhammad Shakeel escribió:
Hi,

If there is a foo.service which is required to run during first system
boot then what is the best solution to permanently disable it afterwards?

I can think of two solutions but I am not sure which one is correct/more
appropriate.

1) ExecStartPost=systemctl disable foo.service (I doubt this will work)
2) ExecStartPost=/bin/rm -f foo.service (this works for me but is this a
clean solution?)

Is there any flag in for systemd unit files which can be set to run a
service on first boot only?

I wont make it needlessly complicated.. just use ConditionPathExists=<a file that is created after install but removed after this first boot program is complete>


--
"Judging by their response, the meanest thing you can do to people on the Internet is to give them really good software for free". - Anil Dash
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to