summarylogtreecommitdiffstats
path: root/10-ypconf
blob: d7f5eab529d721072b67d0484aadcf75753edbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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