Index: head/net-mgmt/icinga2/files/icinga2.in =================================================================== --- head/net-mgmt/icinga2/files/icinga2.in (revision 528497) +++ head/net-mgmt/icinga2/files/icinga2.in (revision 528498) @@ -1,140 +1,122 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: icinga2 # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable icinga2: # icinga2_enable (bool): Set to "NO" by default. # Set it to "YES" to enable icinga2. # icinga2_flags (str): Set to "" by default. # icinga2_configfile (str): Set to "%%PREFIX%%/etc/icinga2/icinga2.conf" by default. # icinga2_mkvar (bool): Set to "NO" by default. # Set it to "YES" to have the rc script create all # directories in /var (needed when /var is on a ramdisk) # . /etc/rc.subr # Add /usr/local/bin to path, so that the notification scripts # can work (#!/usr/bin/env bash) export PATH=$PATH:%%LOCALBASE%%/bin:%%PREFIX%%/sbin name="icinga2" desc="Icinga 2 monitoring (core)" rcvar=icinga2_enable load_rc_config "${name}" : ${icinga2_enable:="NO"} : ${icinga2_configfile="%%PREFIX%%/etc/${name}/${name}.conf"} : ${icinga2_user:="%%ICINGA2USER%%"} : ${icinga2_group:="%%ICINGA2GROUP%%"} : ${icinga2_webgroup:="www"} command="%%PREFIX%%/sbin/${name}" procname="/usr/local/lib/icinga2/sbin/icinga2" extra_commands="reload checkconfig configtest" icinga2_cachedir="/var/cache/${name}" icinga2_libdir="/var/lib/${name}" icinga2_logdir="%%ICINGA2LOGDIR%%" icinga2_rundir="/var/run/${name}" icinga2_spooldir="/var/spool/${name}" pidfile="${icinga2_rundir}/${name}.pid" icinga2_logfile="${icinga2_logdir}/${name}.log" icinga2_errorlogfile="${icinga2_logdir}/error.log" start_cmd="start_cmd" start_precmd="start_precmd" restart_precmd="icinga2_checkconfig" reload_precmd="reload_precmd" checkconfig_cmd="icinga2_checkconfig verbose" configtest_cmd="${checkconfig_cmd}" sig_reload=HUP required_files="${icinga2_configfile}" command_args="daemon -d -e ${icinga2_errorlogfile} -c ${icinga2_configfile}" icinga2_checkconfig() { echo -n "Performing sanity check of icinga2 configuration: " if [ "$1" != "verbose" ]; then quietredir="2>&1 >/dev/null" fi ${command} daemon -c ${icinga2_configfile} -C if [ $? -ne 0 ]; then echo "FAILED" return 1 else echo "OK" fi } reload_precmd() { if ! icinga2_checkconfig; then return 1 fi } -icinga2_checkfib () { - echo "Checkfib called" - exit 1 - if command -v check_namevarlist > /dev/null 2>&1; then - check_namevarlist fib && return 0 - fi - - $SYSCTL net.fibs >/dev/null 2>&1 || return 0 - - icinga2_fib=${icinga2_fib:-"NONE"} - if [ "x$icinga2_fib" != "xNONE" ] - then - command="/usr/sbin/setfib -F ${icinga2_fib} ${command}" - else - return 0 - fi -} - start_precmd() { # Create necessary directories / change ownership # While this is also done through pkg-plist, /var might be on a ramdisk, # so make sure all needed files and directories are created before starting # Icinga. for d in "${icinga2_logdir}" "${icinga2_logdir}/compat" \ "${icinga2_logdir}/compat/archives" "${icinga2_libdir}" \ "${icinga2_spooldir}" "${icinga2_spooldir}/tmp" \ "${icinga2_rundir}" "${icinga2_cachedir}"; do if [ ! -d "${d}" ]; then install -d -o ${icinga2_user} -g ${icinga2_group} "${d}" fi done install -d -o ${icinga2_user} -g ${icinga2_webgroup} -m 2750 "${icinga2_rundir}/cmd" chown -R ${icinga2_user}:${icinga2_group} "${icinga2_libdir}" chown -R ${icinga2_user}:${icinga2_group} "${icinga2_spooldir}" chown -R ${icinga2_user}:${icinga2_group} "${icinga2_cachedir}" chown -R ${icinga2_user}:${icinga2_webgroup} "${icinga2_rundir}/cmd" if ! icinga2_checkconfig; then return 1 fi if [ ! -f "${icinga2_logfile}" ]; then install -o "${icinga2_user}" -g "${icinga2_group}" -m 644 /dev/null "${icinga2_logfile}" fi } start_cmd() { ${command} ${command_args} } run_rc_command "$1" Index: head/sysutils/iichid/Makefile =================================================================== --- head/sysutils/iichid/Makefile (revision 528497) +++ head/sysutils/iichid/Makefile (revision 528498) @@ -1,39 +1,39 @@ # Created by: jrhett@netconsonance.com # $FreeBSD$ PORTNAME= iichid DISTVERSION= 0.0.1 CATEGORIES= sysutils MAINTAINER= imp@FreeBSD.org COMMENT= Generic FreeBSD HID layer for I2C and USB devices LICENSE= BSD2CLAUSE #LICENSE_FILE= Not yet packaged ONLY_FOR_ARCHS= aarch64 amd64 i386 ONLY_FOR_ARCHS_REASON= Requires architecture supporting ACPI USES= kmod uidfix USE_GITHUB= yes GH_ACCOUNT= wulf7 # Strip -Werror from sys/conf/kmod.mk MAKE_ENV= WERROR="" PLIST_FILES= ${KMODDIR}/iichid.ko # USB backend is not yet complete and # interferes with existing USB drivers post-patch: ${REINPLACE_CMD} -e '/usbhid.c/s/^/#/' ${WRKSRC}/Makefile .include -.if ${OSREL} < 12.1 -IGNORE= requires FreeBSD versions 12.1+, this system is running ${OSVERSION} +.if ${OSVERSION} < 1201000 +IGNORE= requires FreeBSD versions 12.1+, this system is running ${OSREL} .endif .include Index: head/sysutils/iichid/distinfo =================================================================== --- head/sysutils/iichid/distinfo (revision 528497) +++ head/sysutils/iichid/distinfo (revision 528498) @@ -1,3 +1,3 @@ -TIMESTAMP = 1581675377 +TIMESTAMP = 1581662226 SHA256 (wulf7-iichid-0.0.1_GH0.tar.gz) = 282540487df1eb3f202f7beb440f68f43801662cb8f817931f09879c1f007a98 SIZE (wulf7-iichid-0.0.1_GH0.tar.gz) = 51001 Index: head/sysutils/iichid/pkg-descr =================================================================== --- head/sysutils/iichid/pkg-descr (revision 528497) +++ head/sysutils/iichid/pkg-descr (revision 528498) @@ -1 +1,7 @@ -Test +FreeBSD driver for I2C HID touchscreens (and may be other devices) + +A complete discussion about how to use this tool can be found at: + +https://larastechlab.blogspot.com/2020/01/i2c-touchpads-on-freebsd-130-current.html + +WWW: https://github.com/wulf7/iichid