#!/bin/sh | |
grep -q systemd.unit=usb-flash.service /proc/cmdline || exit 0 | |
cat > $1/mnt.mount <<EOF | |
[Unit] | |
Description=Mount USB flash at /mnt | |
DefaultDependencies=no | |
Conflicts=umount.target | |
Before=local-fs.target umount.target | |
Requires=systemd-udevd.service | |
[Mount] | |
What=/dev/sda1 | |
Where=/mnt | |
Type=auto | |
Options=relatime,nosuid,nodev | |
EOF |