Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] How should one make /media a tmpfs under 12.3?
Hash: SHA1

В Sat, 29 Jun 2013 21:12:37 +0200 (CEST)
"Carlos E. R." <robin.listas@xxxxxxxxxxxxxx> пишет:

(my objetive is having /media a tmpfs, not changing /tmp)

I'm afraid I still do not see any connection between this objective and
next paragraph. I do not understand why you insist on doing it in the
most convoluted way.

What I have now, is the creation of an empty directory at
"/var/run/media" (done by "/etc/tmpfiles.d/media.conf"). Then I have
"/etc/systemd/system/media.mount" which should bind-mount /media to it,
but this is failing.

I think I also need:

/usr/lib/systemd/system/ -->

As with any other unit you need to tell systemd that you want this unit
to be started. You use dependencies of type Requires (Required-By) or
Wants (Wanted-By) for it. You need to decide, whether your new mount is
optional (.wants) or mandatory (.requires). Systemd automatically
creates units with right dependencies for every filesystem
in /etc/fstab which is one more reason to use it :)

or equivalent. I haven't tried this yet (and I don't like adding files to
"/usr/lib/systemd/", i prefer /etc/systemd).

So do it in /etc/systemd. Or even better, read about [Install] section
in man systemd.unit(5) ... "systemctl enable" even explicitly tells you
that your unit does not have it ...
Version: GnuPG v2.0.19 (GNU/Linux)

< Previous Next >