A forma sistêmica de substituir tmp.mount ou estendê-la é adicione uma substituição local em /etc/systemd/system . Você pode copiar o tmp.mount (de /lib/systemd/system ou /usr/share/systemd provavelmente) existente e editar a cópia ou, melhor ainda, adicionar trechos de configuração para alterar apenas as opções de montagem:
- crie um diretório chamado
/etc/systemd/system/tmp.mount.d -
dentro desse diretório, adicione um arquivo chamado
options.confcontendo[Mount] Options=mode=1777,strictatime,nosuid,nodev,size=1073741824
Observe que systemd.mount ainda diz que
In general, configuring mount points through
/etc/fstabis the preferred approach.
então você pode apenas querer fazer isso. Na verdade, essa é a abordagem recomendada para alterar as opções de montagem de qualquer um dos "sistemas de arquivos de API" do systemd :
Even though normally none of these API file systems are listed in
/etc/fstabthey may be added there. If so, any options specified therein will be applied to that specific API file system. Hence: to alter the mount options or other parameters of these file systems, simply add them to/etc/fstabwith the appropriate settings and you are done. Using this technique it is possible to change the source, type of a file system in addition to simply changing mount options. That is useful to turn/tmpto a true file system backed by a physical disk.
Os sistemas de arquivos da API incluem: /sys , /proc , /dev , /run , /tmp , /sys/fs/cgroup , /sys/kernel/security , /sys/kernel/debug , /sys/kernel/config , /sys/fs/selinux , /dev/shm , /dev/pts , /proc/sys/fs/binfmt_misc , /dev/mqueue , /dev/hugepages , /sys/fs/fuse/connections , /sys/firmware/efi/efivars . O systemd garante que eles sejam montados, mesmo que eles não estejam especificados em /etc/fstab ou em uma unidade de montagem.