forked from pool/systemd
19298a8c3f
- Do not optionally remove /usr/lib/systemd/system/tmp.mnt anymore (bsc#1071224) OBS-URL: https://build.opensuse.org/request/show/570496 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1006
34 lines
1.2 KiB
Desktop File
34 lines
1.2 KiB
Desktop File
#
|
|
# By default, /tmp doesn't use tmpfs on SUSE distros.
|
|
#
|
|
# This service is either run automatically during the firstboot (i.e.
|
|
# only once) of the system.
|
|
#
|
|
# Or it can also be (manually) started during systemd update (%post)
|
|
# only and only if tmp.mount wasn't already installed by the admin in
|
|
# /usr/lib during %pre. In this case tmp.mount should also masked.
|
|
#
|
|
# In any cases this service will never mask tmp.mount if the service
|
|
# has been created by either the admin or fstab-generator.
|
|
#
|
|
[Unit]
|
|
Description=Mask tmp.mount by default on SUSE systems
|
|
DefaultDependencies=no
|
|
Conflicts=shutdown.target
|
|
After=systemd-remount-fs.service
|
|
Before=tmp.mount
|
|
ConditionPathIsReadWrite=/etc
|
|
ConditionPathExists=!/usr/lib/systemd/system/.disable-tmpfs-for-tmp~done
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/bin/sh -c ' \
|
|
case "$(systemctl show -pFragmentPath tmp.mount)" in \
|
|
FragmentPath=/usr/lib/systemd/system/tmp.mount) \
|
|
systemctl mask --now tmp.mount ;; \
|
|
FragmentPath=/usr/share/systemd/tmp.mount) \
|
|
ln -sf /usr/lib/systemd/system/tmp.mount /etc/systemd/system/ ;; \
|
|
esac'
|
|
ExecStartPost=/usr/bin/touch /usr/lib/systemd/system/.disable-tmpfs-for-tmp~done
|