[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Latest Jessie doesn't respond to /etc/default/tmpfs "RAMTMP=yes"



Am 28.07.2014 22:00, schrieb Andrei POPESCU:
> On Du, 27 iul 14, 17:31:37, Rick Thomas wrote:
>>
>> I still can’t figure out how to exercise control over the size and 
>> other mount options, the way I used to be able to do under sysvinit 
>> using options in /etc/default/tmpfs .
> 
> Create /etc/systemd/system/tmp.mount with something like:
> 
> .include /lib/systemd/system/tmp.mount
> [Mount]
> Options=... (your options)

Just a quick comment:
.include is discouraged nowadays. The recommended way is to use drop-in
snippets. So, please don't use ".include" anymore!

As for drop-ins, see [1]

        * Configuration of unit files may now be extended via drop-in
          files without having to edit/override the unit files
          themselves. More specifically, if the administrator wants to
          change one value for a service file foobar.service he can
          now do so by dropping in a configuration snippet into
          /etc/systemd/systemd/foobar.service.d/*.conf. The unit logic
          will load all these snippets and apply them on top of the
          main unit configuration file, possibly extending or
          overriding its settings. Using these drop-in snippets is
          generally nicer than the two earlier options for changing
          unit files locally: copying the files from
          /usr/lib/systemd/system/ to /etc/systemd/system/ and editing
          them there; or creating a new file in /etc/systemd/system/
          that incorporates the original one via ".include". Drop-in
          snippets into these .d/ directories can be placed in any
          directory systemd looks for units in, and the usual
          overriding semantics between /usr/lib, /etc and /run apply
          for them too.


In this particular case that would mean creating a directory
/etc/systemd/system/tmp.mount.d/, then placing a .conf file in there
setting your custom options.


That all said, using /etc/fstab is perfectly fine if you need to tweak
the /tmp tmpfs settings.

An entry from /etc/fstab will override any existing tmp.mount unit.





[1]
http://lists.freedesktop.org/archives/systemd-devel/2013-March/009496.html

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: