summaryrefslogtreecommitdiff
path: root/sysutils/runit/files/patch-src_runit-init.c
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2016-08-11 21:06:42 +0000
committerChris Rees <crees@FreeBSD.org>2016-08-11 21:06:42 +0000
commitaa463ad2ec00fc013e7dc0d5900cb4da5f5bba4e (patch)
tree7337c30035019b65de576703b0b38d40accc1466 /sysutils/runit/files/patch-src_runit-init.c
parentUpdate to version 4.11.0 (diff)
Add pkg-message with hints on replacing init
Patch to allow running from PREFIX without copying (caveat-- must be on root filesystem!) Various minor runtime fixes
Notes
Notes: svn path=/head/; revision=420105
Diffstat (limited to 'sysutils/runit/files/patch-src_runit-init.c')
-rw-r--r--sysutils/runit/files/patch-src_runit-init.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysutils/runit/files/patch-src_runit-init.c b/sysutils/runit/files/patch-src_runit-init.c
new file mode 100644
index 000000000000..9f23f804b2d6
--- /dev/null
+++ b/sysutils/runit/files/patch-src_runit-init.c
@@ -0,0 +1,20 @@
+$FreeBSD$
+
+runit is designed to be placed in /sbin. However, there is no reason that
+PREFIX cannot be respected here, so should a user define in loader.conf this
+in place, then it will still be found.
+
+init_path=/usr/local/sbin/runit-init:/sbin/init
+
+--- src/runit-init.c.orig 2016-08-10 20:53:15 UTC
++++ src/runit-init.c
+@@ -53,6 +53,9 @@ int main (int argc, const char * const *
+ /* kernel is starting init, runit does the job. */
+ execve(RUNIT, (char *const *)prog, envp);
+
++ /* OK, running from PREFIX-- should be default */
++ execve(PREFIX RUNIT, (char *const *)prog, envp);
++
+ /* serious error */
+ strerr_die4sys(111, FATAL, "unable to start ", prog[0], ": ");
+ }