ports/sysutils/runit/files/patch-etc_freebsd_1
Chris Rees a3a0138c36 sysutils/runit: Fix shutdown and reboot
The FreeBSD PREFIX insistence plays havoc with runit, but this
should fix the issues on rebooting and shutting down when using
runit-init.

The problem was because of the inconsistency of where stopit and
reboot are stored.

While here, pet rclint and identify bug in rclint at the same time!
2023-09-17 07:50:43 +01:00

19 lines
471 B
Text

--- etc/freebsd/1.orig 2023-06-06 12:43:28 UTC
+++ etc/freebsd/1
@@ -1,7 +1,7 @@
#!/bin/sh
# system one time tasks
-PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/sbin:%%PREFIX%%/bin
trap : 2
trap : 3
@@ -13,5 +13,5 @@ if test $? -ne 0; then
sh -p
exec reboot
fi
-touch /etc/runit/stopit
-chmod 0 /etc/runit/stopit
+touch /etc/runit/stopit /etc/runit/reboot
+chmod 0 /etc/runit/stopit /etc/runit/reboot