File: 0007-move-communication-files.patch

package info (click to toggle)
runit 2.1.2-54
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,524 kB
  • sloc: ansic: 6,098; sh: 1,741; makefile: 389
file content (120 lines) | stat: -rw-r--r-- 3,895 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
From: Dmitry Bogatov <KAction@gnu.org>
Date: Tue, 12 Mar 2019 19:07:02 +0000
Subject: Move communication files under /run

Last-Update: 2016-06-02

Runit by default uses files /etc/runit/stop and /etc/runit/reboot.
This configuration will not work when /etc is mounted read-only,
as such this patch renames this files into /run/runit.stop and
/run/runit.reboot
Last-Update: 2016-06-02
---
 runit-2.1.2/etc/debian/1          | 4 ++--
 runit-2.1.2/etc/debian/3          | 2 +-
 runit-2.1.2/etc/debian/ctrlaltdel | 4 ++--
 runit-2.1.2/man/runit-init.8      | 8 ++++----
 runit-2.1.2/man/runit.8           | 6 +++---
 runit-2.1.2/src/runit.h           | 4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)

Index: runit/runit-2.1.2/etc/debian/1
===================================================================
--- runit.orig/runit-2.1.2/etc/debian/1
+++ runit/runit-2.1.2/etc/debian/1
@@ -6,5 +6,5 @@ PATH=/command:/sbin:/bin:/usr/sbin:/usr/
 /etc/init.d/rcS
 /etc/init.d/rmnologin
 
-touch /etc/runit/stopit
-chmod 0 /etc/runit/stopit
+touch /run/runit.stopit
+chmod 0 /run/runit.stopit
Index: runit/runit-2.1.2/etc/debian/3
===================================================================
--- runit.orig/runit-2.1.2/etc/debian/3
+++ runit/runit-2.1.2/etc/debian/3
@@ -4,7 +4,7 @@ exec 2>&1
 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
 
 LAST=0
-test -x /etc/runit/reboot && LAST=6
+test -x /run/runit.reboot && LAST=6
 
 echo 'Waiting for services to stop...'
 sv -w196 force-stop /service/*
Index: runit/runit-2.1.2/etc/debian/ctrlaltdel
===================================================================
--- runit.orig/runit-2.1.2/etc/debian/ctrlaltdel
+++ runit/runit-2.1.2/etc/debian/ctrlaltdel
@@ -4,6 +4,6 @@ PATH=/bin:/usr/bin
 MSG="System is going down in 14 seconds..."
 
 # echo 'disabled.' ; exit
-touch /etc/runit/stopit
-chmod 100 /etc/runit/stopit && echo "$MSG" | wall
+touch /etc/runit.stopit
+chmod 100 /etc/runit.stopit && echo "$MSG" | wall
 /bin/sleep 14
Index: runit/runit-2.1.2/man/runit-init.8
===================================================================
--- runit.orig/runit-2.1.2/man/runit-init.8
+++ runit/runit-2.1.2/man/runit-init.8
@@ -26,9 +26,9 @@ To signal
 the system halt request,
 .B runit-init
 removes all permissions of the file
-.I /etc/runit/reboot
+.I /run/runit.reboot
 (chmod 0), and sets the execute by owner permission of the file
-.I /etc/runit/stopit
+.I /run/runit.stopit
 (chmod 100).
 Then a CONT signal is sent to
 .BR runit (8).
@@ -40,9 +40,9 @@ To signal
 the system reboot request,
 .B runit-init
 sets the execute by owner permission of the files
-.I /etc/runit/reboot
+.I /run/runit.reboot
 and
-.I /etc/runit/stopit
+.I /run/runit.stopit
 (chmod 100). Then a CONT signal is sent to
 .BR runit (8).
 .SH EXIT CODES
Index: runit/runit-2.1.2/man/runit.8
===================================================================
--- runit.orig/runit-2.1.2/man/runit.8
+++ runit/runit-2.1.2/man/runit.8
@@ -45,7 +45,7 @@ done here.
 If stage 3 returns,
 .B runit
 checks if the file
-.I /etc/runit/reboot
+.I /run/runit.reboot
 exists and has the execute by owner permission set.
 If so, the system is rebooted, it's halted otherwise.
 If
@@ -70,7 +70,7 @@ only accepts signals in stage 2.
 If
 .B runit
 receives a CONT signal and the file
-.I /etc/runit/stopit
+.I /run/runit.stopit
 exists and has the execute by owner permission set,
 .B runit
 is told to shutdown the system.
Index: runit/runit-2.1.2/src/runit.h
===================================================================
--- runit.orig/runit-2.1.2/src/runit.h
+++ runit/runit-2.1.2/src/runit.h
@@ -1,5 +1,5 @@
 #define RUNIT "/sbin/runit"
-#define STOPIT "/etc/runit/stopit"
-#define REBOOT "/etc/runit/reboot"
+#define STOPIT "/run/runit.stopit"
+#define REBOOT "/run/runit.reboot"
 #define NOSYNC "/etc/runit/nosync"
 #define CTRLALTDEL "/etc/runit/ctrlaltdel"