#!/usr/sbin/openrc-run

description="Mount configfs kernel virtual file system."

depend()
{
	need kmod mountkernfs.sh
	provide mount-configfs
}

start()
{
	readonly mountpoint='/sys/kernel/config'
	test -d "${mountpoint}" || return 0
	! findmnt "${mountpoint}" >/dev/null || return 0

	ebegin "Mounting configfs"
	mount none -t configfs "${mountpoint}"
	eend $?
	return $?
}

stop()
{
	return 0
}
