11.1Smartin#!/bin/sh
21.1Smartin#
31.2Sandvar# $NetBSD: lvmlockdir,v 1.2 2025/11/27 05:04:35 andvar Exp $
41.1Smartin#
51.1Smartin
61.1Smartin# REQUIRE: mountcritlocal
71.1Smartin# BEFORE: CRITLOCALMOUNTED
81.1Smartin
91.1Smartin$_rc_subr_loaded . /etc/rc.subr
101.1Smartin
111.1Smartinname="lvmlockdir"
121.1Smartinstart_cmd="lvmlockdir_start"
131.1Smartinstop_cmd=":"
141.1Smartin
151.1Smartinlvmlockdir_start()
161.1Smartin{
171.1Smartin	#       create LVM locking directory, it needs to be owned by operator
181.2Sandvar	#	group and has permissions to allow lock file creation.
191.1Smartin	#
201.1Smartin	mkdir -p /var/run/lvm
211.1Smartin	chown root:operator /var/run/lvm
221.1Smartin	chmod 770 /var/run/lvm
231.1Smartin	return 0
241.1Smartin}
251.1Smartin
261.1Smartinload_rc_config $name
271.1Smartinrun_rc_command "$1"
28