Jan Kundrát | 7ad2258 | 2018-08-22 19:06:45 +0200 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | grep -q systemd.unit=usb-flash.service /proc/cmdline || exit 0 | ||||
4 | |||||
5 | cat > $1/mnt.mount <<EOF | ||||
6 | [Unit] | ||||
7 | Description=Mount USB flash at /mnt | ||||
8 | DefaultDependencies=no | ||||
9 | Conflicts=umount.target | ||||
10 | Before=local-fs.target umount.target | ||||
11 | Requires=systemd-udevd.service | ||||
12 | |||||
13 | [Mount] | ||||
14 | What=/dev/sda1 | ||||
15 | Where=/mnt | ||||
16 | Type=auto | ||||
17 | Options=relatime,nosuid,nodev | ||||
18 | EOF |