systemd question, how to do global settings like what initscript wasfor

initscript was designed to allow setting things like ulimits and such so that
even services that were not PAM enabled could start with certain limits in
place. Many large scale software packages desire these types of things mainly
though it’s certainly a “hammer” style solution.

So… since initscript is a sysvinit feature, how do we accomplish the same with
systemd such that, for example, a ulimit change is applied to everything that is
started. Again, not talking about using something that only works for PAM
enabled things, talking about a solution that works universally for every init
thing like we used to do with initscript.

Really? That is news to me. Could you please give link to design document?

how do we accomplish the same with
systemd

http://www.freedesktop.org/software/systemd/man/systemd-system.conf.html

If talking about theoretical generalities,

I would think what you’re asking for might depend on what is being run…

If you’re spawning multiple instances of the same thing, unlike sysVinit, systemd instantiates multiple copies of the same thing, sharing the same basecode. Each instance automatically is configured the same as every other instance.

I don’t know for sure but would expect that if you created a “Parent” or “Master” unit file that limits the CGroup it instantiates, then all other processes invoked by this systemd Unit file running within that CGroup would live within the same overall limited environment. But, this is only what seems logical to me and requires further investigation to verify.

TSU

The initscript man page:

Thanks for this. And it’'s nice to see systemd added support for this (it wasn’t there initially).

I have never seen this script in any distribution I worked with.