#!/bin/bash

. /usr/lib/eole/diagnose.sh

EOLE_DIR="/usr/share/eole/creole"
patchfiles="${EOLE_DIR}/patch/*.patch ${EOLE_DIR}/patch/variante/*.patch"
if [ `ls $patchfiles 2>/dev/null|wc -l` -gt 0 ];then
    EchoGras "*** Patches"
    printf ".  %${len_pf}s => " "patches"
    /usr/share/creole/testpatches.py
    echo
fi

set_title=0
for container in $(CreoleGet --groups);do
    cpath=$(CreoleGet container_path_$container)
    for file in $(ls $cpath/etc/init.d/*.dpkg-dist 2>/dev/null); do
        if [ $set_title = 0 ]; then
            EchoGras "*** Scripts d'init pas à jour"
            set_title=1
        fi
        EchoRouge "-  $(basename ${file%.dpkg-dist}) ($container)"
    done
done
exit 0
