#!/bin/sh
# Readiness of lxcfs: the FUSE filesystem is mounted on /var/lib/incus-lxcfs
# (fuse.lxcfs) -- only then can containers bind /proc files from it.
# incus depends on incus-lxcfs and thereby waits for exactly this point.
awk '$2=="/var/lib/incus-lxcfs" && $3=="fuse.lxcfs" {f=1} END{exit !f}' /proc/mounts && exit 0
echo "fuse.lxcfs not mounted on /var/lib/incus-lxcfs"
exit 1
