[Unit]
Description=Bind mount volatile /etc/resolv.dnsmasq
DefaultDependencies=false
Before=local-fs.target
RequiresMountsFor=/var/volatile /etc
ConditionPathIsReadWrite=/var/volatile
ConditionPathExists=/etc/resolv.dnsmasq
ConditionPathIsReadWrite=!/etc/resolv.dnsmasq

[Service]
Type=oneshot
RemainAfterExit=Yes
StandardOutput=syslog
TimeoutSec=0
ExecStart=/sbin/mount-copybind /var/volatile/resolv.dnsmasq /etc/resolv.dnsmasq
ExecStop=/bin/umount /etc/resolv.dnsmasq

[Install]
WantedBy=local-fs.target
