2020-08-10 11:28:19 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Mount initrd fstab entries for Ignition
|
|
|
|
DefaultDependencies=false
|
|
|
|
Before=ignition-complete.target
|
|
|
|
|
|
|
|
# Make sure ExecStop= runs before we switch root
|
|
|
|
Before=initrd-switch-root.target
|
|
|
|
|
|
|
|
After=initrd-root-fs.target
|
|
|
|
After=ignition-remount-sysroot.service
|
|
|
|
|
|
|
|
# Run only after Ignition's mount stage - mount points configured by Ignition
|
|
|
|
# itself will be skipped below, just mount the rest.
|
|
|
|
Requires=ignition-mount.service
|
|
|
|
After=ignition-mount.service
|
|
|
|
Before=ignition-files.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2022-04-06 19:10:21 +02:00
|
|
|
ExecStart=/bin/sh -e -c 'eval $(awk '"'"'$4 ~ /x-initrd.mount/ && $1 !~ /^#/ {print "if ! findmnt /sysroot" $2 " >/dev/null; then mount -t " $3 " -o " $4 " " $1 " /sysroot" $2 "; fi;" }'"'"' /sysroot/etc/fstab)'
|