[Pkg-systemd-maintainers] Bug#738687: systemd does not mount /tmp as tmpfs (even if RAMTMP=yes in rcS)

Michael Biebl biebl at debian.org
Wed Feb 12 00:40:48 GMT 2014


Hello,

Am 12.02.2014 01:06, schrieb pasky at ucw.cz:
> Dear Maintainer,
> 
> even though I have RAMTMP=yes in /etc/default/rcS, recently (~2w ago?)
> installed systemd will not mount /tmp as tmpfs.
> 
> Of course, /etc/default/rcS is not a configuration file of systemd so I
> wouldn't consider a bug that it doesn't look there. However, I believe
> that to provide smooth upgrade experience, basic system configuration
> should be preserved during a switch to systemd.

You are right, /etc/default/rcS is not a systemd configuration file and
we deliberately don't read that file.

We do ship a tmp.mount unit though (disabled by default), which you can
easily enable via "systemctl enable tmp.mount"

That said, it seems those settings are stored in /etc/default/tmpfs
nowadays, not /etc/default/rcS

> Therefore, I think systemd install scripts should configure systemd
> according to settings specified in /etc/default/rcS, or at least query
> the user in case there'd be a good reason to switch away from /tmp as
> tmpfs during an upgrade to systemd.

We could do a one-time migration of that setting in postinst, similar to
how we handle the UTC or TMPTIME configuration. This is a simple patch,
something like that

# Do a on-time migration of the RAMTMP setting
if dpkg --compare-versions "$2" lt "204-8"; then
    if [ -f /etc/default/rcS ]; then
        . /etc/default/rcS
    fi
    if [ -f /etc/default/tmpfs ]; then
        . /etc/default/tmpfs
    fi
    if [ "$RAMTMP" = "yes" ]; then
        systemctl enable tmp.mount || true
    fi
fi

I deliberately use systemctl here, and not _systemctl(). "systemctl
enable" should work even if systemd is not the active PID 1

I'm not sure if we should read both /etc/default/rcS and
/etc/default/tmpfs or if the latter only would be sufficient.

Tollef, Michael, thoughts?

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140212/2c1751eb/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list