diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-12-16 05:41:01 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-12-16 05:41:01 +0000 |
commit | ea879232fcb739a41403fd30df4e7c77a7ff4661 (patch) | |
tree | 6a45f8bc5f042cf314609a2d98b654d05278946a /pkgtools | |
parent | 67b0ee930b591e65fc7bd643fc8dd35170fe857b (diff) | |
download | pkgsrc-ea879232fcb739a41403fd30df4e7c77a7ff4661.tar.gz |
Add FreeBSD support, trivially.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/rc.d-boot/DEINSTALL | 13 | ||||
-rw-r--r-- | pkgtools/rc.d-boot/INSTALL | 4 | ||||
-rw-r--r-- | pkgtools/rc.d-boot/Makefile | 17 |
3 files changed, 24 insertions, 10 deletions
diff --git a/pkgtools/rc.d-boot/DEINSTALL b/pkgtools/rc.d-boot/DEINSTALL index a412feea8f8..5fb170bf5cb 100644 --- a/pkgtools/rc.d-boot/DEINSTALL +++ b/pkgtools/rc.d-boot/DEINSTALL @@ -1,4 +1,4 @@ -# $NetBSD: DEINSTALL,v 1.1 2018/12/12 02:08:10 schmonz Exp $ +# $NetBSD: DEINSTALL,v 1.2 2018/12/16 05:41:01 schmonz Exp $ RCDBOOT_STYLE=@RCDBOOT_STYLE@ @@ -8,6 +8,8 @@ DEINSTALL) case "${RCDBOOT_STYLE}" in darwin-launchd) ;; + freebsd-native) + ;; linux-systemd) systemctl disable pkgsrc-rc.d-boot.service ;; @@ -15,7 +17,11 @@ DEINSTALL) ;; esac - ${CAT} <<EOF + case "${RCDBOOT_STYLE}" in + *-native) + ;; + *) + ${CAT} <<EOF =========================================================================== pkgsrc-provided rc.d scripts will no longer be started at boot. @@ -24,6 +30,9 @@ If you wish to stop them, please do so now. =========================================================================== EOF + ;; + esac + ;; esac diff --git a/pkgtools/rc.d-boot/INSTALL b/pkgtools/rc.d-boot/INSTALL index 66c3afa9c09..82c828db3f5 100644 --- a/pkgtools/rc.d-boot/INSTALL +++ b/pkgtools/rc.d-boot/INSTALL @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.3 2018/12/12 02:08:10 schmonz Exp $ +# $NetBSD: INSTALL,v 1.4 2018/12/16 05:41:01 schmonz Exp $ RCDBOOT_STYLE=@RCDBOOT_STYLE@ @@ -9,6 +9,8 @@ POST-INSTALL) darwin-launchd) launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist ;; + freebsd-native) + ;; linux-systemd) systemctl enable --now /etc/systemd/system/pkgsrc-rc.d-boot.service ;; diff --git a/pkgtools/rc.d-boot/Makefile b/pkgtools/rc.d-boot/Makefile index 3f93a6c73ca..86783021c5a 100644 --- a/pkgtools/rc.d-boot/Makefile +++ b/pkgtools/rc.d-boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2018/12/12 02:08:10 schmonz Exp $ +# $NetBSD: Makefile,v 1.4 2018/12/16 05:41:01 schmonz Exp $ # PKGNAME= rc.d-boot-20181211 @@ -12,12 +12,12 @@ ONLY_FOR_PLATFORM= # empty by default .include "../../mk/bsd.prefs.mk" -.if ${OPSYS} != "NetBSD" +.if exists(/sbin/rcorder) +RCORDER= /sbin/rcorder +.else DEPENDS+= rc.subr-[0-9]*:../../pkgtools/rc.subr DEPENDS+= rcorder-[0-9]*:../../pkgtools/rcorder RCORDER= ${PREFIX}/sbin/rcorder -.else -RCORDER= /sbin/rcorder .endif NO_CHECKSUM= yes @@ -33,17 +33,20 @@ SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR RCORDER FILES_SUBST+= RCDBOOT_STYLE=${RCDBOOT_STYLE:Q} .if ${OPSYS} == "Darwin" && exists (/Library/LaunchDaemons) -ONLY_FOR_PLATFORM+= Darwin-*-* +ONLY_FOR_PLATFORM+= ${OPSYS}-*-* RCDBOOT_STYLE= darwin-launchd CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/org.pkgsrc.rc.d-boot.plist \ /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist +.elif ${OPSYS} == "FreeBSD" && exists(/etc/rc.d) +ONLY_FOR_PLATFORM+= ${OPSYS}-*-* +RCDBOOT_STYLE= freebsd-native .elif ${OPSYS} == "Linux" && exists(/etc/systemd/system) -ONLY_FOR_PLATFORM+= Linux-*-* +ONLY_FOR_PLATFORM+= ${OPSYS}-*-* RCDBOOT_STYLE= linux-systemd CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/pkgsrc-rc.d-boot.service \ /etc/systemd/system/pkgsrc-rc.d-boot.service .elif ${OPSYS} == "NetBSD" && exists(/etc/rc.d) -ONLY_FOR_PLATFORM+= NetBSD-*-* +ONLY_FOR_PLATFORM+= ${OPSYS}-*-* RCDBOOT_STYLE= netbsd-native .endif |