#!/bin/bash
# DHCPv4
if [ -n "$DHCP4_NIS_DOMAIN" ] && [ -n "$DHCP4_NIS_SERVERS" ]; then
case "$2" in
dhcp4-change)
yp_conf_new=/etc/yp.conf
echo "#Generated by NetworkManager dispatcher" > $yp_conf_new
for nis_server in $DHCP4_NIS_SERVERS; do
echo "domain $DHCP4_NIS_DOMAIN server $nis_server" >> $yp_conf_new
done
;;
esac
fi