mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 14:23:08 +02:00
15 lines
396 B
Desktop File
15 lines
396 B
Desktop File
[Unit]
|
|
Description=Bind mount /etc/hosts over itself as read-only (friction layer)
|
|
After=local-fs.target
|
|
Before=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/bin/mount --bind /etc/hosts /etc/hosts
|
|
ExecStart=/bin/mount -o remount,ro,bind /etc/hosts
|
|
ExecStartPost=/usr/bin/logger -t hosts-bind-mount "Hosts file bind-mounted read-only"
|
|
RemainAfterExit=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|