Cross Reference: iscsid
xref: /src/etc/rc.d/iscsid
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /src/etc/rc.d/
11.1Sjoerg#!/bin/sh
21.1Sjoerg#
31.3Smartin# $NetBSD: iscsid,v 1.3 2020/09/08 12:52:18 martin Exp $
41.1Sjoerg#
51.1Sjoerg
61.1Sjoerg# PROVIDE: iscsid
71.3Smartin# REQUIRE: NETWORKING CRITLOCALMOUNTED
81.1Sjoerg# BEFORE:  securelevel mountcritremote
91.1Sjoerg
101.1Sjoerg$_rc_subr_loaded . /etc/rc.subr
111.1Sjoerg
121.1Sjoergname="iscsid"
131.1Sjoergrcvar=$name
141.1Sjoergcommand="/sbin/${name}"
151.1Sjoergpidfile="/var/run/${name}.pid"
161.1Sjoergstart_precmd="iscsid_precmd"
171.1Sjoerg
181.1Sjoergfind_module()
191.1Sjoerg{
201.1Sjoerg	local module rest
211.1Sjoerg	/sbin/modstat $1 | while read module rest; do
221.1Sjoerg		if [ "$module" = "$1" ]; then
231.1Sjoerg			echo found
241.1Sjoerg			break
251.1Sjoerg		fi
261.1Sjoerg	done
271.1Sjoerg}
281.1Sjoerg
291.1Sjoergiscsid_precmd()
301.1Sjoerg{
311.1Sjoerg	if [ "$(find_module iscsi)" != "found" ]; then
321.1Sjoerg		/sbin/modload iscsi
331.1Sjoerg	fi
341.1Sjoerg}
351.1Sjoerg
361.1Sjoergload_rc_config $name
371.1Sjoergrun_rc_command "$1"
38

Indexes created Mon Nov 10 17:20:41 GMT 2025