On Wed, 03 Sep 2014 16:35:51 +0200 Pierre Neyron <pierre.ney...@free.fr> wrote: > > Even if installing a NIS server is pretty rare (and rarer and rarer), it > turns out that this point makes _automating_ a fresh NIS server > installation (e.g. in a Vagrant setup) a real pain. > I'm currently in that case and trying to figure out a "nice" workaround. > (any idea would be welcome) >
Answering to myself, for what it's worth, my good enough workaround: NISDOMAIN="MyNISDomain" echo "nis nis/domain string $NISDOMAIN" | debconf-set-selections echo '[ "$1" = "nis" ] && exit 101 || exit 0' > /usr/sbin/policy-rc.d; chmod +x /usr/sbin/policy-rc.d DEBIAN_FRONTEND=noninteractive apt-get install -y nis rm /usr/sbin/policy-rc.d nisdomainname $NISDOMAIN sed -i -e "s/^\(NISSERVER=\).*/\1true/" /etc/default/nis /usr/lib/yp/ypinit -m < /dev/null 2> /dev/null service nis restart Pierre