Jan Kundrát | b425ea8 | 2017-10-19 17:56:36 +0200 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Mount persistent config at /cfg |
| 3 | DefaultDependencies=no |
| 4 | Conflicts=umount.target |
| 5 | Before=local-fs.target umount.target |
| 6 | After=etc-overlay.service |
| 7 | |
| 8 | [Service] |
| 9 | Type=oneshot |
| 10 | # This is ugly, but required due to the limitations of the mount units' names |
| 11 | # (I need two "duplicates" which differ in the ConditionKernelCommandLine) |
Jan Kundrát | 672d908 | 2017-10-20 17:20:57 +0200 | [diff] [blame^] | 12 | ExecStart=/bin/sh -c '(grep -q rauc.slot=A /proc/cmdline && mount -o relatime,nodev,nosuid,errors=panic /dev/mmcblk0p2 /cfg) || (grep -q rauc.slot=B /proc/cmdline && mount -o relatime,nodev,nosuid,errors=panic /dev/mmcblk0p4 /cfg)' |