summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet16
1 files changed, 12 insertions, 4 deletions
diff --git a/mdkapplet b/mdkapplet
index 0d39413a..8dee807c 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -289,6 +289,7 @@ Glib::Timeout->add_seconds($config{FIRST_CHECK_DELAY}/1000, sub {
$SIG{USR1} = 'IGNORE';
$SIG{USR2} = 'IGNORE';
$SIG{CHLD} = \&harvester;
+$SIG{HUP} = \&restart_applet;
run_program::raw({ detach => 1 }, 'ionice', '-p', $$, '-n7');
@@ -433,6 +434,13 @@ sub harvester {
return @pids;
}
+sub restart_applet {
+ local $SIG{CHLD} = 'DEFAULT';
+ log::explanations(N("Received SIGHUP (probably an upgrade has finished), restarting applet."));
+ { redo if wait() > 0 }
+ exec($0, '--auto-update');
+}
+
# FIXME: we can run many drakconnect when network is down:
sub configNetwork() {
log::explanations(N_("Launching drakconnect\n"));
@@ -612,10 +620,10 @@ sub no_more_supported() {
sub get_extended_maintenance() {
- $mdv_update_pid = fork_exec('mdkapplet-extended-maintenance-helper', $product_id->{version},
- if_($::testing, '--testing'),
- if_($download_all, "--download-all=$download_dir"),
- if_($root, "--urpmi-root=$root"));
+ $mdv_update_pid = fork_exec('mdkapplet-add-media-helper',
+ if_($root, "--urpmi-root=$root"),
+ '--product=extended',
+ $product_id->{version});
}