pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/rc.d-boot
Module Name: pkgsrc
Committed By: schmonz
Date: Wed Dec 12 02:08:10 UTC 2018
Modified Files:
pkgsrc/pkgtools/rc.d-boot: INSTALL Makefile PLIST
Added Files:
pkgsrc/pkgtools/rc.d-boot: DEINSTALL
pkgsrc/pkgtools/rc.d-boot/files: pkgsrc-rc.d-boot.service
Log Message:
Support Linux with systemd. Set LICENSE (2-clause-bsd). Bump version.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/rc.d-boot/DEINSTALL
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/rc.d-boot/INSTALL \
pkgsrc/pkgtools/rc.d-boot/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/rc.d-boot/PLIST
cvs rdiff -u -r0 -r1.1 \
pkgsrc/pkgtools/rc.d-boot/files/pkgsrc-rc.d-boot.service
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/rc.d-boot/INSTALL
diff -u pkgsrc/pkgtools/rc.d-boot/INSTALL:1.2 pkgsrc/pkgtools/rc.d-boot/INSTALL:1.3
--- pkgsrc/pkgtools/rc.d-boot/INSTALL:1.2 Wed Dec 5 19:49:26 2018
+++ pkgsrc/pkgtools/rc.d-boot/INSTALL Wed Dec 12 02:08:10 2018
@@ -1,15 +1,18 @@
-# $NetBSD: INSTALL,v 1.2 2018/12/05 19:49:26 schmonz Exp $
+# $NetBSD: INSTALL,v 1.3 2018/12/12 02:08:10 schmonz Exp $
-OPSYS=@OPSYS@
+RCDBOOT_STYLE=@RCDBOOT_STYLE@
-case ${STAGE} in
+case "${STAGE}" in
POST-INSTALL)
- case "${OPSYS}" in
- Darwin)
+ case "${RCDBOOT_STYLE}" in
+ darwin-launchd)
launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
;;
- NetBSD)
+ linux-systemd)
+ systemctl enable --now /etc/systemd/system/pkgsrc-rc.d-boot.service
+ ;;
+ netbsd-native)
;;
esac
Index: pkgsrc/pkgtools/rc.d-boot/Makefile
diff -u pkgsrc/pkgtools/rc.d-boot/Makefile:1.2 pkgsrc/pkgtools/rc.d-boot/Makefile:1.3
--- pkgsrc/pkgtools/rc.d-boot/Makefile:1.2 Wed Dec 5 19:49:26 2018
+++ pkgsrc/pkgtools/rc.d-boot/Makefile Wed Dec 12 02:08:10 2018
@@ -1,13 +1,14 @@
-# $NetBSD: Makefile,v 1.2 2018/12/05 19:49:26 schmonz Exp $
+# $NetBSD: Makefile,v 1.3 2018/12/12 02:08:10 schmonz Exp $
#
-PKGNAME= rc.d-boot-20181205
+PKGNAME= rc.d-boot-20181211
CATEGORIES= pkgtools
MAINTAINER= schmonz%NetBSD.org@localhost
COMMENT= Run package rc.d scripts at boot on any supported OS
+LICENSE= 2-clause-bsd
-ONLY_FOR_PLATFORM= Darwin-*-* NetBSD-*-*
+ONLY_FOR_PLATFORM= # empty by default
.include "../../mk/bsd.prefs.mk"
@@ -24,14 +25,26 @@ NO_BUILD= yes
SUBST_CLASSES= paths
SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= rc.d-boot org.pkgsrc.rc.d-boot.plist
+SUBST_FILES.paths= rc.d-boot
+SUBST_FILES.paths+= org.pkgsrc.rc.d-boot.plist \
+ pkgsrc-rc.d-boot.service
SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR RCORDER
-FILES_SUBST+= OPSYS=${OPSYS:Q}
+FILES_SUBST+= RCDBOOT_STYLE=${RCDBOOT_STYLE:Q}
-.if ${OPSYS} == "Darwin"
+.if ${OPSYS} == "Darwin" && exists (/Library/LaunchDaemons)
+ONLY_FOR_PLATFORM+= Darwin-*-*
+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} == "Linux" && exists(/etc/systemd/system)
+ONLY_FOR_PLATFORM+= Linux-*-*
+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-*-*
+RCDBOOT_STYLE= netbsd-native
.endif
INSTALLATION_DIRS= sbin share/examples/${PKGBASE}
@@ -40,7 +53,10 @@ do-extract:
${CP} -R ${FILESDIR} ${WRKSRC}
do-install:
- ${INSTALL_DATA} ${WRKSRC}/org.pkgsrc.rc.d-boot.plist ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/
+. for i in org.pkgsrc.rc.d-boot.plist \
+ pkgsrc-rc.d-boot.service
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/
+. endfor
${INSTALL_SCRIPT} ${WRKSRC}/rc.d-boot ${DESTDIR}${PREFIX}/sbin/
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/pkgtools/rc.d-boot/PLIST
diff -u pkgsrc/pkgtools/rc.d-boot/PLIST:1.1 pkgsrc/pkgtools/rc.d-boot/PLIST:1.2
--- pkgsrc/pkgtools/rc.d-boot/PLIST:1.1 Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/PLIST Wed Dec 12 02:08:10 2018
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.2 2018/12/12 02:08:10 schmonz Exp $
sbin/rc.d-boot
share/examples/rc.d-boot/org.pkgsrc.rc.d-boot.plist
+share/examples/rc.d-boot/pkgsrc-rc.d-boot.service
Added files:
Index: pkgsrc/pkgtools/rc.d-boot/DEINSTALL
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/DEINSTALL:1.1
--- /dev/null Wed Dec 12 02:08:10 2018
+++ pkgsrc/pkgtools/rc.d-boot/DEINSTALL Wed Dec 12 02:08:10 2018
@@ -0,0 +1,29 @@
+# $NetBSD: DEINSTALL,v 1.1 2018/12/12 02:08:10 schmonz Exp $
+
+RCDBOOT_STYLE=@RCDBOOT_STYLE@
+
+case "${STAGE}" in
+
+DEINSTALL)
+ case "${RCDBOOT_STYLE}" in
+ darwin-launchd)
+ ;;
+ linux-systemd)
+ systemctl disable pkgsrc-rc.d-boot.service
+ ;;
+ netbsd-native)
+ ;;
+ esac
+
+ ${CAT} <<EOF
+===========================================================================
+
+pkgsrc-provided rc.d scripts will no longer be started at boot.
+
+If you wish to stop them, please do so now.
+
+===========================================================================
+EOF
+ ;;
+
+esac
Index: pkgsrc/pkgtools/rc.d-boot/files/pkgsrc-rc.d-boot.service
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/files/pkgsrc-rc.d-boot.service:1.1
--- /dev/null Wed Dec 12 02:08:11 2018
+++ pkgsrc/pkgtools/rc.d-boot/files/pkgsrc-rc.d-boot.service Wed Dec 12 02:08:10 2018
@@ -0,0 +1,12 @@
+[Unit]
+Description = Run all pkgsrc rc.d scripts enabled in /etc/rc.conf
+After = syslog.target network.target
+
+[Service]
+Type = oneshot
+ExecStart = @PREFIX@/sbin/rc.d-boot start
+ExecStop = @PREFIX@/sbin/rc.d-boot stop
+RemainAfterExit = True
+
+[Install]
+WantedBy = multi-user.target
Home |
Main Index |
Thread Index |
Old Index