diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-29 18:56:37 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-29 18:56:37 +0000 |
commit | ed736da568826f215979bb853e5fd3d046178601 (patch) | |
tree | 14508d8a43e44ea6f3aef5e07d0d2d0db7b29d35 | |
parent | 4dd035489e3ea4e336d70d5c10fec628828cd5b0 (diff) | |
download | control-center-ed736da568826f215979bb853e5fd3d046178601.tar control-center-ed736da568826f215979bb853e5fd3d046178601.tar.gz control-center-ed736da568826f215979bb853e5fd3d046178601.tar.bz2 control-center-ed736da568826f215979bb853e5fd3d046178601.tar.xz control-center-ed736da568826f215979bb853e5fd3d046178601.zip |
(sig_child) restart services if requested
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | control-center | 7 | ||||
-rwxr-xr-x | lib/MDV/Control_Center.pm | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,4 +1,5 @@ - refresh the icon list if some package got installed +- restart cups service when installing system-config-print Version 12.16 - 27 October 2009, Thierry Vignaud diff --git a/control-center b/control-center index 2d1af4d2..0e01ee8c 100755 --- a/control-center +++ b/control-center @@ -1348,6 +1348,13 @@ sub sig_child { @pid_launched = grep { $_ ne $child_pid } @pid_launched; if ($child_pid == $gurpmi_pid) { undef $gurpmi_pid; + + my @services; + if ($programs{$tool}{services_to_start_after_install}) { + @services = @{$programs{$tool}{services_to_start_after_install}}; + run_program::raw({ detach => 1 }, 'service', $_, 'restart') foreach @services; + } + # refresh the icon list if some package got installed (eg: system-config-printer) build_list(); load_view(); diff --git a/lib/MDV/Control_Center.pm b/lib/MDV/Control_Center.pm index a738fe71..d54a27f6 100755 --- a/lib/MDV/Control_Center.pm +++ b/lib/MDV/Control_Center.pm @@ -475,6 +475,7 @@ our %programs = description => N("Set up the printer(s), the print job queues, ..."), icon => 'printer-mcc-mdk', long_description => N("Set up the printer(s), the print job queues, ..."), + services_to_start_after_install => [ 'cups' ], application_driven_menu => 1, }, |