#!/bin/bash
. /usr/lib/eole/diagnose.sh
EchoGras "*** Serveur DHCP"
if [ $(CreoleGet activer_dhcp) = 'oui' ];then
    TestPid DHCP dhcpd
else
    Inactif "DHCP"
fi
if [ $(CreoleGet activer_tftp) = 'oui' ];then
    # test possible uniquement si TFTP local (#5525)
    if [ $(CreoleGet adresse_ip_tftp) = "$(CreoleGet adresse_ip_eth0)" ] ||
       [ $(CreoleGet adresse_ip_tftp) = "$(CreoleGet adresse_ip_fichier_link 2>/dev/null)" ] ||
       [ $(CreoleGet adresse_ip_tftp) = "$(CreoleGet adresse_ip_ltsp_link 2>/dev/null)" ];then
        TestUDP TFTP 69 dhcp
    else
        printf ".  %${len_pf}s => " "TFTP"
        EchoOrange "Distant"
    fi
fi
echo
exit 0
