mirror of
https://git.freebsd.org/ports.git
synced 2025-06-09 14:50:31 -04:00
The rcvar (zfsprom_enable) must be initialized. Otherwise, rc(8) complains with the following message: /etc/rc: WARNING: $zfsprom_enable is not set properly - see rc.conf(5).
32 lines
679 B
Bash
32 lines
679 B
Bash
#! /bin/sh -
|
|
#
|
|
# SPDX-License-Identifier: (BSD-2-Clause or Unlicense)
|
|
#
|
|
# Copyright (c) 2021 Mateusz Piotrowski <0mp@FreeBSD.org>
|
|
#
|
|
|
|
# Add the following lines to rc.conf(5) to configure the zfsprom service:
|
|
#
|
|
# zfsprom_enable (bool): Set to "YES" to enable the service.
|
|
# Default: "NO".
|
|
|
|
# PROVIDE: zfsprom
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="zfsprom"
|
|
rcvar="zfsprom_enable"
|
|
|
|
load_rc_config "${name}"
|
|
|
|
: "${zfsprom_enable:=NO}"
|
|
|
|
pidfile="/var/run/${name}.pid"
|
|
procname="%%PREFIX%%/sbin/zfsprom.py"
|
|
command_interpreter="%%PYTHON_CMD%%"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-o /var/log/${name}.log -p ${pidfile} -- ${procname}"
|
|
|
|
run_rc_command "$1"
|