echo "DOMAIN=domain.domain" | tee -a /etc/sysconfig/network-scripts/ifcfg-eth0
> cat ifcfg-eth0
DOMAIN=localhost
> export DOMAIN=local.lan && sed -i '' -e "s|DOMAIN=.*$|DOMAIN=$DOMAIN|" ifcfg-eth0
> cat ifcfg-eth0
DOMAIN=local.lan
echo "DOMAIN=domain.domain" >> /etc/sysconfig/network-scripts/ifcfg-eth0