blob: 4ec5cdef4bcea69e4741a4d8eccf876d7e952dad [file] [log] [blame]
[Unit]
Description=Mount persistent config at /cfg
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
After=etc-overlay.service
[Service]
Type=oneshot
# This is ugly, but required due to the limitations of the mount units' names
# (I need two "duplicates" which differ in the ConditionKernelCommandLine)
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)'