summaryrefslogtreecommitdiff
path: root/sysutils/cbsd/files
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2014-07-13 11:38:47 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2014-07-13 11:38:47 +0000
commitc00cf327d8a44f3bd22403110c9043486682bfc6 (patch)
treeda9d658fb55fca35a9861867e7b5825b6c2a57fc /sysutils/cbsd/files
parentbiology/platon: Unbreak by hosting known distfiles elsewhere (diff)
Update to 10.0.6.
Changes for 10.0.6: cbsd taskd: daemon for internal tasks bconstruct-tui: menubox for vm_os_type and get_vm_profiles bhyve: add support for install FreeBSD guest from ISO bhyve: implement other method for POPCNT checking repo: newjname as argument for alternative name of stored jail PR: 191844 Submitted by: olevole@olevole.ru (maintainer)
Notes
Notes: svn path=/head/; revision=361672
Diffstat (limited to 'sysutils/cbsd/files')
-rw-r--r--sysutils/cbsd/files/cbsdd.in45
1 files changed, 26 insertions, 19 deletions
diff --git a/sysutils/cbsd/files/cbsdd.in b/sysutils/cbsd/files/cbsdd.in
index 25d71789c695..eeda220ad335 100644
--- a/sysutils/cbsd/files/cbsdd.in
+++ b/sysutils/cbsd/files/cbsdd.in
@@ -20,28 +20,28 @@ export NO_CBSD_HISTORY=yes
globalconf=${cbsd_globalconf:-"${workdir}/cbsd.conf"}
if [ ! -f ${globalconf} ]; then
- echo "cbsd: no such ${globalconf}";
- exit 1
+ echo "cbsd: no such ${globalconf}";
+ exit 1
fi
if [ ! -f ${inventory} ]; then
- echo "cbsd: no such ${inventory}";
- exit 1
+ echo "cbsd: no such ${inventory}";
+ exit 1
fi
if [ ! -f ${mdtools} ]; then
- echo "cbsd: no such ${mdtools}";
- exit 1
+ echo "cbsd: no such ${mdtools}";
+ exit 1
fi
if [ ! -f ${subr} ]; then
- echo "cbsd: no such ${subr}";
- exit 1
+ echo "cbsd: no such ${subr}";
+ exit 1
fi
if [ ! -f ${localcbsdconf} ]; then
- echo "cbsd: no such ${localcbsdconf}";
- exit 1
+ echo "cbsd: no such ${localcbsdconf}";
+ exit 1
fi
. ${globalconf}
@@ -53,25 +53,32 @@ fi
start_precmd=${name}_prestart
stop_precmd=${name}_prestop
+stop_cmd=${name}_stop
-command="${sbindir}/cbsdd"
+command="${toolsdir}/cbsdd"
pidfile="/var/run/$name.pid"
+command_args="&"
cbsdd_prestart() {
- find ${ftmpdir} -depth 1 -maxdepth 1 -type f -exec rm -f {} \;
- %%PREFIX%%/bin/cbsd sysinv mode=update
- %%PREFIX%%/bin/cbsd netinv
+ /usr/bin/find ${ftmpdir} -depth 1 -maxdepth 1 -type f -exec rm -f {} \;
+ %%PREFIX%%/bin/cbsd sysinv mode=update
+ %%PREFIX%%/bin/cbsd netinv
- . ${inventory}
+ . ${inventory}
- [ -n "$nat_enable" ] && %%PREFIX%%/bin/cbsd naton
- /usr/sbin/daemon ${rcddir}/jails-astart start
+ [ -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
+ ${rcddir}/jails-astart stop
+ [ -n "${nat_enable}" ] && %%PREFIX%%/bin/cbsd natoff
+}
+
+cbsdd_stop()
+{
+ [ -f "${pidfile}" ] && kill -9 $( cat ${pidfile} )
}
run_rc_command "$1"