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") ctfiles=("$crontab")
fi fi
else else
array_from_xlines ctfiles "$(crontab -l 2>/dev/null | awkrun script="$script" '$6 == script { print $7 }')" 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 ""; then if array_contains ctfiles "GENERIC"; then
# il y a une planification générique # il y a une planification générique
array_del ctfiles "" array_del ctfiles "GENERIC"
set_usercrontabs usercrontabs set_usercrontabs usercrontabs
array_extend ctfiles usercrontabs array_extend ctfiles usercrontabs
elif [ ${#ctfiles[*]} -eq 0 ]; then elif [ ${#ctfiles[*]} -eq 0 ]; then
ewarn "aucune planification en cours" einfo "aucune planification en cours"
set_usercrontabs ctfiles set_usercrontabs ctfiles
fi fi
fi fi