From e29fda79ee27c50608b78a06322fffe4d8468afa Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Mon, 17 Jan 2005 20:11:25 +0000 Subject: Bugzilla 13056 - custom cron setup --- perl-install/standalone/drakbackup | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index f92f48803..c2104b834 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -2177,12 +2177,11 @@ sub advanced_when() { $entry_crontab->set_text("$time_string $exec_string"); } - $combo_minute_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_minute_when->get_text - 1, 0) }); - $combo_hour_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_hour_when->get_text - 1, 1) }); + $combo_minute_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_minute_when->get_text, 0) }); + $combo_hour_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_hour_when->get_text, 1) }); $combo_day_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_day_when->get_text, 2) }); - $combo_month_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_month_when->get_text, 3) }); - $combo_weekday_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_weekday_when->get_text - 1, 4) }); - + $combo_month_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_month_when->get_active, 3) }); + $combo_weekday_when->entry->signal_connect('changed', sub { combo_to_cron_string($combo_weekday_when->get_active - 1, 4) }); $entry_media_type->entry->signal_connect('changed', sub { $conf{DAEMON_MEDIA} = $entry_media_type->entry->get_text }); fonction_env(\$box_when, \&advanced_when, \&advanced_box); $up_box->show_all; @@ -2190,8 +2189,8 @@ sub advanced_when() { sub combo_to_cron_string { my ($field, $location) = @_; - $field = "*" if $field == 0 && $location > 1 && $location < 4; - $field = "*" if $field == -1 && ($location < 2 || $location == 4); + $field = "*" if $field == 0 && $location == 3; + $field = "*" if $field == -1 && $location == 4; my @time_list = split(" ", $time_string); splice(@time_list, $location, 1, $field); $time_string = join(" ", @time_list); -- cgit v1.2.1