bug avec le support des planifications génériques

This commit is contained in:
Jephté Clain 2014-04-23 18:42:15 +04:00
parent d70809b9eb
commit b639feca57
1 changed files with 4 additions and 4 deletions

View File

@ -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