From b639feca57611b36ec97ec8af1b2086f05df131e Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Wed, 23 Apr 2014 18:42:15 +0400 Subject: [PATCH] =?UTF-8?q?bug=20avec=20le=20support=20des=20planification?= =?UTF-8?q?s=20g=C3=A9n=C3=A9riques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uscrontab | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uscrontab b/uscrontab index 85bc28b..0ac3a21 100755 --- a/uscrontab +++ b/uscrontab @@ -287,14 +287,14 @@ elif [ "$action" == "list" ]; then ctfiles=("$crontab") fi else - array_from_xlines ctfiles "$(crontab -l 2>/dev/null | awkrun script="$script" '$6 == script { print $7 }')" - if array_contains ctfiles ""; then + array_from_lines ctfiles "$(crontab -l 2>/dev/null | awkrun script="$script" '$6 == script { if ($7) print $7; else print "GENERIC" }')" + if array_contains ctfiles "GENERIC"; then # il y a une planification générique - array_del ctfiles "" + array_del ctfiles "GENERIC" set_usercrontabs usercrontabs array_extend ctfiles usercrontabs elif [ ${#ctfiles[*]} -eq 0 ]; then - ewarn "aucune planification en cours" + einfo "aucune planification en cours" set_usercrontabs ctfiles fi fi