Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -2,11 +2,11 @@ .export DAEMONIZER?=svc.daemon #.MAKE.JOBS?=2 -#.SILENT: +.SILENT: .include "${DAEMONIZER}" .if defined(AUTOBOOT) SCRIPTS=${:!find /etc/mrc -name '*.init' -o -name '*.service'!:S/\/etc\/mrc\///} @@ -20,14 +20,14 @@ SCRIPTS=${:!find /etc/mrc -name '*.service'!:S/\/etc\/mrc\///} DAEMON: .endif -TARGETS=${SCRIPTS:S/.init//:S/.service//} +TARGETS:=${SCRIPTS:S/.init//:S/.service//} .MAIN: ${TARGETS} .PHONY: ${TARGETS} _daemon _service .for file in ${SCRIPTS} .include "${file}" .endfor Index: cron.service ================================================================== --- cron.service +++ cron.service @@ -1,6 +1,6 @@ # vim:ft=make: -DAEMON_cron_COMMAND?=cron +DAEMON_cron_COMMAND?=/usr/sbin/cron DAEMON_cron_FLAGS?=-s cron: _service LOGIN Index: devd.service ================================================================== --- devd.service +++ devd.service @@ -1,9 +1,9 @@ # vim:ft=make: -DAEMON_devd_COMMAND?=devd +DAEMON_devd_COMMAND?=/sbin/devd DAEMON_devd_FLAGS?=-dq devd: _service ifconfig -.if !empty(${DAEMON_devd_ENABLE:tl:Mno}) +.if !empty(DAEMON_devd_ENABLE:tl:Mno) sysctl hw.bus.devctl_disable=1 .endif Index: dhcpcd.service ================================================================== --- dhcpcd.service +++ dhcpcd.service @@ -1,7 +1,7 @@ # vim:ft=make: -DAEMON_dhcpcd_COMMAND?=dhcpcd +DAEMON_dhcpcd_COMMAND?=/sbin/dhcpcd DAEMON_dhcpcd_ENABLE?=no DAEMON_dhcpcd_FLAGS?=-B dhcpcd: _service mount cleanvar ifconfig Index: dntpd.service ================================================================== --- dntpd.service +++ dntpd.service @@ -1,6 +1,6 @@ # vim:ft=make: -DAEMON_dntpd_COMMAND?=dntpd +DAEMON_dntpd_COMMAND?=/usr/sbin/dntpd DAEMON_dntpd_FLAGS?=-F dntpd: _service NETWORK Index: dumpon.init ================================================================== --- dumpon.init +++ dumpon.init @@ -1,9 +1,9 @@ # vim:ft=make: DUMPDEV?=no dumpon: random -.if empty(${DUMPDEV:tl:Mno}) +.if empty(DUMPDEV:tl:Mno) : Setting dumpon device. - : dumpon -v ${DUMPDEV} + dumpon -v ${DUMPDEV} .endif Index: mixer.init ================================================================== --- mixer.init +++ mixer.init @@ -3,9 +3,7 @@ mixers=${:!find /dev -name 'mixer*'!:S/\/dev\///} mixer: mount cleanvar : Restoring mixer levels. .for mixer in ${mixers} -.if exists(/var/db/${mixer}-state) - mixer -f /dev/${mixer} `cat /var/db/${mixer}-state` -.endif + -test -f /var/db/${mixer}-state && mixer -f /dev/${mixer} `cat /var/db/${mixer}-state` .endfor Index: node_exporter.service ================================================================== --- node_exporter.service +++ node_exporter.service @@ -6,8 +6,6 @@ DAEMON_node_exporter_TEXTFILE_DIR?=/var/tmp/node_exporter DAEMON_node_exporter_USER?=nobody DAEMON_node_exporter_GROUP?=nobody node_exporter: _daemon -.if !exists(DAEMON_node_exporter_TEXTFILE_DIR) install -d -o ${DAEMON_node_exporter_USER} -g ${DAEMON_node_exporter_GROUP} -m1755 ${DAEMON_node_exporter_TEXTFILE_DIR} -.endif Index: savecore.init ================================================================== --- savecore.init +++ savecore.init @@ -2,12 +2,12 @@ DUMPDIR?=/var/crash CRASHINFO_ENABLE?=no savecore: dumpon -.if empty(${DUMPDEV:tl:Mno}) && exists(${DUMPDEV}) && exists(${DUMPDIR}) +.if empty(DUMPDEV:tl:Mno) && exists(${DUMPDEV}) && exists(${DUMPDIR}) : Saving coredump. savecore ${DUMPDIR} ${DUMPDEV} -.if empty(${CRASHINFO_ENABLE:tl:Mno}) +.if empty(CRASHINFO_ENABLE:tl:Mno) crashinfo -d ${DUMPDIR} .endif .endif Index: smartd.service ================================================================== --- smartd.service +++ smartd.service @@ -2,11 +2,9 @@ DAEMON_smartd_COMMAND?=/usr/local/sbin/smartd DAEMON_smartd_ENABLE?=no DAEMON_smartd_FLAGS?=-c /usr/local/etc/smartd.conf -n -.if !exists(/usr/local/etc/smartd.conf) -DAEMON_smartd_ENABLE=no -.info smartd requires config file to start -.endif - smartd: _daemon + test -d /usr/local/etc/smartd.conf || { \ + echo smartd requires config file to start. ; \ + exit 0 ; } Index: svc.daemon ================================================================== --- svc.daemon +++ svc.daemon @@ -1,11 +1,11 @@ # vim:ft=make: _daemon: DAEMON .USE -.if empty(${DAEMON_$@_ENABLE:tl:Mno}) +.if empty(DAEMON_$@_ENABLE:tl:Mno) svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} .endif _service: .USE -.if empty(${DAEMON_$@_ENABLE:tl:Mno}) +.if empty(DAEMON_$@_ENABLE:tl:Mno) svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} .endif Index: swap.init ================================================================== --- swap.init +++ swap.init @@ -1,9 +1,7 @@ # vim:ft=make: -SWAP_ENABLED!=sysctl -n vm.swap_enabled - swap: savecore -.if ${SWAP_ENABLED} != 0 +.if ${:!sysctl -n vm.swap_enabled!}} != 0 : Enabling swap. swapon -a .endif Index: syslogd.service ================================================================== --- syslogd.service +++ syslogd.service @@ -1,6 +1,6 @@ # vim:ft=make: -DAEMON_syslogd_COMMAND?=syslogd +DAEMON_syslogd_COMMAND?=/usr/sbin/syslogd DAEMON_syslogd_FLAGS?=-ss8cc syslogd: _service Index: watchdogd.service ================================================================== --- watchdogd.service +++ watchdogd.service @@ -2,10 +2,10 @@ DAEMON_watchdogd_COMMAND?=/usr/sbin/watchdogd DAEMON_watchdogd_ENABLE?=no DAEMON_watchdogd_FLAGS?=-d -.if empty(${:!sysctl -qn debug.watchdog || exit 0!}) +.if empty(:!sysctl -qn debug.watchdog || exit 0!) DAEMON_watchdogd_ENABLE=no .endif watchdogd: _daemon