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 5 19:23:04 UTC 2018
Added Files:
pkgsrc/pkgtools/rc.d-boot: DESCR INSTALL Makefile PLIST
pkgsrc/pkgtools/rc.d-boot/files: org.pkgsrc.rc.d-boot.plist rc.d-boot
Log Message:
Initial version of rc.d-boot, a package that runs all rc.conf-enabled
rc.d scripts at boot time as one "service" in your operating system's
normal boot process. Just Darwin so far. Please pitch in for your
preferred OS!
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/rc.d-boot/DESCR \
pkgsrc/pkgtools/rc.d-boot/INSTALL pkgsrc/pkgtools/rc.d-boot/Makefile \
pkgsrc/pkgtools/rc.d-boot/PLIST
cvs rdiff -u -r0 -r1.1 \
pkgsrc/pkgtools/rc.d-boot/files/org.pkgsrc.rc.d-boot.plist \
pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/pkgtools/rc.d-boot/DESCR
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/DESCR:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/DESCR Wed Dec 5 19:23:04 2018
@@ -0,0 +1,2 @@
+This package runs all rc.conf-enabled rc.d scripts at boot time as one
+"service" in your operating system's normal boot process.
Index: pkgsrc/pkgtools/rc.d-boot/INSTALL
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/INSTALL:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/INSTALL Wed Dec 5 19:23:04 2018
@@ -0,0 +1,10 @@
+# $NetBSD: INSTALL,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+
+case ${STAGE} in
+
+POST-INSTALL)
+ launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+
+ ;;
+
+esac
Index: pkgsrc/pkgtools/rc.d-boot/Makefile
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/Makefile:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/Makefile Wed Dec 5 19:23:04 2018
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+#
+
+PKGNAME= rc.d-boot-20181205
+CATEGORIES= pkgtools
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+COMMENT= Run package rc.d scripts at boot on any supported OS
+
+ONLY_FOR_PLATFORM= Darwin-*-*
+
+DEPENDS+= rc.subr-[0-9]*:../../pkgtools/rc.subr
+DEPENDS+= rcorder-[0-9]*:../../pkgtools/rcorder
+
+NO_CHECKSUM= yes
+NO_BUILD= yes
+
+SUBST_CLASSES= paths
+SUBST_STAGE.paths= pre-configure
+SUBST_FILES.paths= rc.d-boot org.pkgsrc.rc.d-boot.plist
+SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR
+
+CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/org.pkgsrc.rc.d-boot.plist \
+ /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+
+INSTALLATION_DIRS= sbin share/examples/${PKGBASE}
+
+do-extract:
+ ${CP} -R ${FILESDIR} ${WRKSRC}
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/org.pkgsrc.rc.d-boot.plist ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/
+ ${INSTALL_SCRIPT} ${WRKSRC}/rc.d-boot ${DESTDIR}${PREFIX}/sbin/
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/pkgtools/rc.d-boot/PLIST
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/PLIST:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/PLIST Wed Dec 5 19:23:04 2018
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+sbin/rc.d-boot
+share/examples/rc.d-boot/org.pkgsrc.rc.d-boot.plist
Index: pkgsrc/pkgtools/rc.d-boot/files/org.pkgsrc.rc.d-boot.plist
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/files/org.pkgsrc.rc.d-boot.plist:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/files/org.pkgsrc.rc.d-boot.plist Wed Dec 5 19:23:04 2018
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>Disabled</key>
+ <false/>
+ <key>Label</key>
+ <string>org.pkgsrc.rc.d-boot</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>@PREFIX@/sbin/rc.d-boot</string>
+ <string>start</string>
+ </array>
+ <key>OnDemand</key>
+ <false/>
+ <key>KeepAlive</key>
+ <false/>
+ <key>LaunchOnlyOnce</key>
+ <true/>
+</dict>
+</plist>
Index: pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot
diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot:1.1
--- /dev/null Wed Dec 5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot Wed Dec 5 19:23:04 2018
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+run_all_rcd_scripts() {
+ action="$1"; shift
+
+ # from NetBSD /etc/rc
+ scripts=$(for rcd in @RCD_SCRIPTS_DIR@; do
+ test -d ${rcd} && echo ${rcd}/*;
+ done)
+
+ files=$(@PREFIX@/sbin/rcorder -s nostart ${scripts})
+
+ for _rc_elem in $files; do
+ $_rc_elem ${action}
+ done
+}
+
+usage() {
+ echo >&2 "usage: $0 <start|stop>"
+ exit 1
+}
+
+main() {
+ [ $# -eq 1 ] || usage
+ action="$1"; shift
+
+ run_all_rcd_scripts "${action}"
+}
+
+main "$@"
+exit $?
Home |
Main Index |
Thread Index |
Old Index