xref: /netbsd-src/tests/sys/rc/h_simple.sh (revision 2c2857e92093ac94279414d442b660bd30b32186)
1*2c2857e9Sjmmv#! /bin/sh
2*2c2857e9Sjmmv#
3*2c2857e9Sjmmv# $NetBSD: h_simple.sh,v 1.1 2010/03/15 19:03:08 jmmv Exp $
4*2c2857e9Sjmmv#
5*2c2857e9Sjmmv# Copyright (c) 2010 The NetBSD Foundation, Inc.
6*2c2857e9Sjmmv# All rights reserved.
7*2c2857e9Sjmmv#
8*2c2857e9Sjmmv# This code is derived from software contributed to The NetBSD Foundation
9*2c2857e9Sjmmv# by Julio Merino.
10*2c2857e9Sjmmv#
11*2c2857e9Sjmmv# Redistribution and use in source and binary forms, with or without
12*2c2857e9Sjmmv# modification, are permitted provided that the following conditions
13*2c2857e9Sjmmv# are met:
14*2c2857e9Sjmmv# 1. Redistributions of source code must retain the above copyright
15*2c2857e9Sjmmv#    notice, this list of conditions and the following disclaimer.
16*2c2857e9Sjmmv# 2. Redistributions in binary form must reproduce the above copyright
17*2c2857e9Sjmmv#    notice, this list of conditions and the following disclaimer in the
18*2c2857e9Sjmmv#    documentation and/or other materials provided with the distribution.
19*2c2857e9Sjmmv#
20*2c2857e9Sjmmv# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21*2c2857e9Sjmmv# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22*2c2857e9Sjmmv# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23*2c2857e9Sjmmv# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24*2c2857e9Sjmmv# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25*2c2857e9Sjmmv# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26*2c2857e9Sjmmv# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27*2c2857e9Sjmmv# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28*2c2857e9Sjmmv# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29*2c2857e9Sjmmv# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30*2c2857e9Sjmmv# POSSIBILITY OF SUCH DAMAGE.
31*2c2857e9Sjmmv#
32*2c2857e9Sjmmv
33*2c2857e9Sjmmv#
34*2c2857e9Sjmmv# A very simple rc.d script that defines the minimum variables to be functional.
35*2c2857e9Sjmmv#
36*2c2857e9Sjmmv
37*2c2857e9Sjmmv${_rc_subr_loaded} . /etc/rc.subr
38*2c2857e9Sjmmv
39*2c2857e9Sjmmvname="h_simple"
40*2c2857e9Sjmmvrcvar="${name}"
41*2c2857e9Sjmmvcommand="/bin/sleep"
42*2c2857e9Sjmmvcommand_args="300 &"
43*2c2857e9Sjmmv
44*2c2857e9Sjmmvload_rc_config "${name}"
45*2c2857e9Sjmmvrun_rc_command "${@}"
46