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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200 | --- sysvinit/redhat/cloud-config 2017-09-15 13:36:12.387896491 -0400
+++ sysvinit/suse/cloud-config 2017-09-21 12:36:20.773957465 -0400
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (C) 2012 Yahoo! Inc.
+
#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2017 SUSE LLC
#
# This file is part of cloud-init. See LICENSE file for license information.
@@ -14,9 +14,9 @@
# Provides: cloud-config
# Required-Start: cloud-init cloud-init-local
# Should-Start: $time
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 2 3 4 5
+# Required-Stop: $null
+# Should-Stop: $null
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: The config cloud-init job
# Description: Start cloud-init and runs the config phase
@@ -49,6 +49,9 @@
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
+. /etc/rc.status
+rc_reset
+
start() {
[ -x $cloud_init ] || return 5
[ -f $conf ] || return 6
@@ -105,4 +108,6 @@
;;
esac
-exit $RETVAL
+_rc_status=$RETVAL
+rc_status -v
+rc_exit
--- sysvinit/redhat/cloud-final 2017-09-15 13:36:12.387896491 -0400
+++ sysvinit/suse/cloud-final 2017-09-21 12:36:20.773957465 -0400
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (C) 2012 Yahoo! Inc.
+
#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2017 SUSE LLC
#
# This file is part of cloud-init. See LICENSE file for license information.
@@ -12,11 +12,11 @@
### BEGIN INIT INFO
# Provides: cloud-final
-# Required-Start: $all cloud-config
+# Required-Start: cloud-config
# Should-Start: $time
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 2 3 4 5
+# Required-Stop: $null
+# Should-Stop: $null
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: The final cloud-init job
# Description: Start cloud-init and runs the final phase
@@ -49,6 +49,9 @@
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
+. /etc/rc.status
+rc_reset
+
start() {
[ -x $cloud_init ] || return 5
[ -f $conf ] || return 6
@@ -105,4 +108,6 @@
;;
esac
-exit $RETVAL
+_rc_status=$RETVAL
+rc_status -v
+rc_exit
--- sysvinit/redhat/cloud-init 2017-09-15 13:36:12.387896491 -0400
+++ sysvinit/suse/cloud-init 2017-09-21 12:36:20.773957465 -0400
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (C) 2012 Yahoo! Inc.
+
#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2017 SUSE LLC
#
# This file is part of cloud-init. See LICENSE file for license information.
@@ -14,9 +14,9 @@
# Provides: cloud-init
# Required-Start: $local_fs $network $named $remote_fs cloud-init-local
# Should-Start: $time
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 2 3 4 5
+# Required-Stop: $null
+# Should-Stop: $null
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: The initial cloud-init job (net and fs contingent)
# Description: Start cloud-init and runs the initialization phase
@@ -49,6 +49,9 @@
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
+. /etc/rc.status
+rc_reset
+
start() {
[ -x $cloud_init ] || return 5
[ -f $conf ] || return 6
@@ -90,6 +93,8 @@
;;
status)
echo -n $"Checking for service $prog:"
+ RETVAL=3
+ [ -e /root/.ssh/authorized_keys ] && RETVAL=0
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
@@ -97,7 +102,6 @@
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
- RETVAL=3
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|condrestart|restart|force-reload|reload}"
@@ -105,4 +109,6 @@
;;
esac
-exit $RETVAL
+_rc_status=$RETVAL
+rc_status -v
+rc_exit
--- sysvinit/redhat/cloud-init-local 2017-09-15 13:36:12.387896491 -0400
+++ sysvinit/suse/cloud-init-local 2017-09-21 12:36:20.773957465 -0400
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright (C) 2012 Yahoo! Inc.
+
#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2017 SUSE LLC
#
# This file is part of cloud-init. See LICENSE file for license information.
@@ -10,16 +10,13 @@
# See: http://www.novell.com/coolsolutions/feature/15380.html
# Also based on dhcpd in RHEL (for comparison)
-# Bring this up before network, S10
-#chkconfig: 2345 09 91
-
### BEGIN INIT INFO
# Provides: cloud-init-local
-# Required-Start: $local_fs
+# Required-Start: $local_fs $remote_fs
# Should-Start: $time
-# Required-Stop:
-# Should-Stop:
-# Default-Start: 2 3 4 5
+# Required-Stop: $null
+# Should-Stop: $null
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: The initial cloud-init job (local fs contingent)
# Description: Start cloud-init and runs the initialization phases
@@ -52,6 +49,9 @@
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
+. /etc/rc.status
+rc_reset
+
start() {
[ -x $cloud_init ] || return 5
[ -f $conf ] || return 6
@@ -108,4 +108,6 @@
;;
esac
-exit $RETVAL
+_rc_status=$RETVAL
+rc_status -v
+rc_exit
|