summaryrefslogblamecommitdiff
path: root/system/mdevd/mdevd.initd
blob: e9dff025f5ddbbaa8c9ea8850e3aecb9c7b6e6e6 (plain) (tree)
1
2
                  
                                   
















                                                                         
                                    





                               
                                      

                                     
                          








                                            
#!/sbin/openrc-run
# Copyright 2019-2023 Adélie Linux

description="mdevd manages device permissions and symbolic links in /dev"
extra_started_commands="reload"
description_reload="Reload the mdevd configuration file"

depend()
{
	use modloop
	need sysfs dev-mount
	before checkfs fsck
	keyword -lxc -systemd-nspawn -vserver
	provide dev
}

stop()
{
	ebegin "Stopping mdevd"
	s6-svc -D /run/service/mdevd
	eend $?
}

start()
{
	ebegin "Starting mdevd"
	s6-svc -UwU /run/service/mdevd
	eend $?
	ebegin "Coldplugging devices"
	mdevd-coldplug -O4
	eend $?
}

reload()
{
	ebegin "Reloading mdevd config file"
	s6-svc -h /run/service/mdevd
	eend $?
}