blob: e1256a8e33f49e309b389c701b499358b43b6452 [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 /dev/mmcblk0p2 /cfg) || (grep -q rauc.slot=B /proc/cmdline && mount -o relatime,nodev,nosuid /dev/mmcblk0p4 /cfg)'