Use service instead of direct call of initscript (Closes: #602186)
Thanks Jörg Sommer!
Axel Beckert
12 years ago
182 | 182 |
if path.startswith('/etc/init.d/'):
|
183 | 183 |
if path.endswith('.sh'):
|
184 | 184 |
continue
|
185 | |
package.initscripts.add(path)
|
|
185 |
package.initscripts.add(path[12:])
|
186 | 186 |
# Alternatively, find init.d scripts that match the process name
|
187 | 187 |
if len(package.initscripts) == 0:
|
188 | 188 |
for process in package.processes:
|
189 | |
path = '/etc/init.d/' + os.path.basename(process.program)
|
190 | |
if os.path.exists(path):
|
191 | |
package.initscripts.add(path)
|
|
189 |
proc_name = os.path.basename(process.program)
|
|
190 |
if os.path.exists('/etc/init.d/' + proc_name):
|
|
191 |
package.initscripts.add(proc_name)
|
192 | 192 |
|
193 | 193 |
restartable = []
|
194 | 194 |
nonrestartable = []
|
|
196 | 196 |
for package in packages.values():
|
197 | 197 |
if len(package.initscripts) > 0:
|
198 | 198 |
restartable.append(package)
|
199 | |
restartCommands.extend(map(lambda s: s + ' restart',package.initscripts))
|
|
199 |
restartCommands.extend(map(lambda s: 'service ' + s + ' restart',package.initscripts))
|
200 | 200 |
else:
|
201 | 201 |
nonrestartable.append(package)
|
202 | 202 |
|
20 | 20 |
- Bump version number to 1.4
|
21 | 21 |
* [checkrestart]
|
22 | 22 |
- Skip nagios spool files (Closes: #637238, thanks Guillaume Delacour)
|
|
23 |
- Use service instead of direct call of initscript (Closes: #602186,
|
|
24 |
thanks Jörg Sommer)
|
23 | 25 |
* [bash_completion]
|
24 | 26 |
- Install debmany bash completion file to /etc/bash_completion.d
|
25 | 27 |
instead of as example. Rename it for easier use of dh_install.
|