summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakbackup
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2005-01-17 20:09:16 +0000
committerStew Benedict <stewb@mandriva.org>2005-01-17 20:09:16 +0000
commit24fe18c101353d6986beb925f31fc119464773c9 (patch)
treed909fd8a79f7eca6b2d2d06a1fc77b51e3d4e228 /perl-install/standalone/drakbackup
parent50276cbd9b676e1eb5df19b26afa6b41844788aa (diff)
downloaddrakx-backup-do-not-use-24fe18c101353d6986beb925f31fc119464773c9.tar
drakx-backup-do-not-use-24fe18c101353d6986beb925f31fc119464773c9.tar.gz
drakx-backup-do-not-use-24fe18c101353d6986beb925f31fc119464773c9.tar.bz2
drakx-backup-do-not-use-24fe18c101353d6986beb925f31fc119464773c9.tar.xz
drakx-backup-do-not-use-24fe18c101353d6986beb925f31fc119464773c9.zip
Bugzilla 13056 - custom cron configuration
Diffstat (limited to 'perl-install/standalone/drakbackup')
-rwxr-xr-xperl-install/standalone/drakbackup13
1 files changed, 6 insertions, 7 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index fcff87e4e..cd7d61ed9 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -2176,12 +2176,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;
@@ -2189,8 +2188,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);