blob: e1256a8e33f49e309b389c701b499358b43b6452 [file] [log] [blame]
Jan Kundrátb425ea82017-10-19 17:56:36 +02001[Unit]
2Description=Mount persistent config at /cfg
3DefaultDependencies=no
4Conflicts=umount.target
5Before=local-fs.target umount.target
6After=etc-overlay.service
7
8[Service]
9Type=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)
12ExecStart=/bin/sh -c '(grep -q rauc.slot=A /proc/cmdline && mount -o relatime,nodev,nosuid /dev/mmcblk0p2 /cfg) || (grep -q rauc.slot=B /proc/cmdline && mount -o relatime,nodev,nosuid /dev/mmcblk0p4 /cfg)'