Cross Reference: modules
xref: /src/etc/rc.d/modules
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /src/etc/rc.d/
11.1Sjmcneill#!/bin/sh
21.1Sjmcneill#
31.2Smlelstv# $NetBSD: modules,v 1.2 2015/04/06 15:07:50 mlelstv Exp $
41.1Sjmcneill#
51.1Sjmcneill
61.1Sjmcneill# PROVIDE: modules
71.2Smlelstv# REQUIRE: fsck_root
81.2Smlelstv# BEFORE: root
91.1Sjmcneill
101.1Sjmcneill$_rc_subr_loaded . /etc/rc.subr
111.1Sjmcneill
121.1Sjmcneillname="modules"
131.1Sjmcneillrcvar=$name
141.1Sjmcneillstart_cmd="modules_start"
151.1Sjmcneillstop_cmd=":"
161.1Sjmcneill
171.1Sjmcneillmodules_start()
181.1Sjmcneill{
191.1Sjmcneill	if [ -f /etc/modules.conf ]; then
201.1Sjmcneill		echo "Loading modules."
211.2Smlelstv		while read name args; do
221.2Smlelstv			case $name in
231.2Smlelstv			''|"#"*)
241.2Smlelstv				;;
251.2Smlelstv			*)
261.2Smlelstv				(
271.2Smlelstv					set -o noglob
281.2Smlelstv					eval set -- $args
291.2Smlelstv					modload "$@" "$name"
301.2Smlelstv				)
311.2Smlelstv				;;
321.2Smlelstv			esac
331.2Smlelstv		done < /etc/modules.conf
341.1Sjmcneill	fi
351.1Sjmcneill}
361.1Sjmcneill
371.1Sjmcneillload_rc_config $name
381.1Sjmcneillrun_rc_command "$1"
39

Indexes created Mon Jan 26 14:10:17 GMT 2026