Mageia Bugzilla – Attachment 4242 Details for
Bug 10934
drakwizard - Proftpd wizard fails because of --no-block option in systemctl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
New subroutine for 'systemctl reload-or-restart'
services.pm.patch (text/plain), 692 bytes, created by
Derek Jennings
on 2013-08-06 20:19:07 CEST
(
hide
)
Description:
New subroutine for 'systemctl reload-or-restart'
Filename:
MIME Type:
Creator:
Derek Jennings
Created:
2013-08-06 20:19:07 CEST
Size:
692 bytes
patch
obsolete
>--- services.pm 2013-08-06 19:08:43.771761848 +0100 >+++ services.pm 2013-08-06 19:11:31.000000000 +0100 >@@ -507,6 +507,17 @@ > _run_action($service, is_service_running($service) ? "restart" : "start"); > } > >+sub reload_or_restart ($) { >+ my ($service) = @_; >+ # Exit silently if the service is not installed >+ service_exists($service) or return 1; >+ if (running_systemd()) { >+ run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service"); >+ } else { >+ run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", 'restart'); >+ } >+} >+ > sub start ($) { > my ($service) = @_; > # Exit silently if the service is not installed
--- services.pm 2013-08-06 19:08:43.771761848 +0100 +++ services.pm 2013-08-06 19:11:31.000000000 +0100 @@ -507,6 +507,17 @@ _run_action($service, is_service_running($service) ? "restart" : "start"); } +sub reload_or_restart ($) { + my ($service) = @_; + # Exit silently if the service is not installed + service_exists($service) or return 1; + if (running_systemd()) { + run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service"); + } else { + run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", 'restart'); + } +} + sub start ($) { my ($service) = @_; # Exit silently if the service is not installed
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 10934
: 4242 |
4243