#!/usr/sbin/openrc-run

description="bootclean after mountnfs."

depend()
{
	need mountnfs.sh
	provide mountnfs-bootclean
}

. /lib/init/bootclean.sh

# See checkroot-bootclean.sh — never wipe /run/openrc via clean /run.
clean_all()
{
	command -v find >/dev/null 2>&1 || return 0
	log_begin_msg "Cleaning up temporary files..."
	ES=0
	clean_tmp || ES=1
	clean /run/lock "! -type d" || ES=1
	[ -d /run/shm ] && clean /run/shm "! -type d" || true
	log_end_msg $ES
	return $ES
}

start()
{
	if ! clean_all; then
		ewarn "mountnfs-bootclean: clean_all failed (continuing boot)"
	fi
	return 0
}

stop()
{
	return 0
}
