blob: 4ec5cdef4bcea69e4741a4d8eccf876d7e952dad [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)
Jan Kundrát672d9082017-10-20 17:20:57 +020012ExecStart=/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)'