mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 06:10:30 -04:00
- jail2iso: imgsize arg renamed to freesize - jcreate: jailskeldir path configure via jail.conf - cbsdsh: build-in function for is_number - Support for allow.kmem, which is allows to run Xorg server in the jail - Initial support for bhyve PR: ports/188661 Submitted by: Oleg Ginzburg <olevole@olevole.ru> (maintainer)
77 lines
1.3 KiB
Bash
77 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# PROVIDE: cbsdd
|
|
# REQUIRE: LOGIN FILESYSTEMS sshd
|
|
# KEYWORD: shutdown
|
|
#
|
|
# cbsdd_enable="YES"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=cbsdd
|
|
rcvar=cbsdd_enable
|
|
load_rc_config $name
|
|
|
|
: ${cbsdd_enable="NO"}
|
|
|
|
export workdir="${cbsd_workdir}"
|
|
export NO_CBSD_HISTORY=yes
|
|
globalconf=${cbsd_globalconf:-"${workdir}/cbsd.conf"}
|
|
|
|
if [ ! -f ${globalconf} ]; then
|
|
echo "cbsd: no such ${globalconf}";
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f ${inventory} ]; then
|
|
echo "cbsd: no such ${inventory}";
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f ${mdtools} ]; then
|
|
echo "cbsd: no such ${mdtools}";
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f ${subr} ]; then
|
|
echo "cbsd: no such ${subr}";
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f ${localcbsdconf} ]; then
|
|
echo "cbsd: no such ${localcbsdconf}";
|
|
exit 1
|
|
fi
|
|
|
|
. ${globalconf}
|
|
. ${inventory}
|
|
. ${mdtools}
|
|
. ${subr}
|
|
|
|
. ${localcbsdconf}
|
|
|
|
start_precmd=${name}_prestart
|
|
stop_precmd=${name}_prestop
|
|
|
|
command="${sbindir}/cbsdd"
|
|
pidfile="/var/run/$name.pid"
|
|
|
|
cbsdd_prestart() {
|
|
find ${ftmpdir} -depth 1 -maxdepth 1 -type f -exec rm -f {} \;
|
|
%%PREFIX%%/bin/cbsd sysinv mode=update
|
|
%%PREFIX%%/bin/cbsd netinv
|
|
|
|
. ${inventory}
|
|
|
|
[ -n "$nat_enable" ] && %%PREFIX%%/bin/cbsd naton
|
|
/usr/sbin/daemon ${rcddir}/jails-astart start
|
|
}
|
|
|
|
cbsdd_prestop()
|
|
{
|
|
${rcddir}/jails-astart stop
|
|
[ -n "${nat_enable}" ] && %%PREFIX%%/bin/cbsd natoff
|
|
}
|
|
|
|
run_rc_command "$1"
|