Since Ubuntu 17.10 Artful, Ubuntu has decided to use netplan instead
of ifupdown.
40-setup-networking-deb-netplan has been contributed by Arno and Peter.
(see https://github.com/xen-tools/xen-tools/issues/51#issuecomment-412019510)
Closesxen-tools/xen-tools#51.
Since we have to make a variant of hooks/karmic/ as hook/artful/,
rename hooks/karmic/80-install-kernel (which previously was unique to
hooks/karmic/) to hooks/common/80-install-kernel-ubuntu and add
symlinks to it from hooks/karmic/ and hook/artful/.
All hooks files which were identical in two groups (debianoid and
redhatoid) have been moved to the new hooks/common directory and now
have symbolic links to the according new files at their old locations.
All hooks files which were identical and had no second group of
identically named hook files have been moved to a new hooks/common
directory and now have symbolic links to the new single file at their
old locations.
Also slightly modified to make this work:
* Makefile: copy new hooks/common directory
* Some tests: ignore new hooks/common directory
This is the official way, needs no own parsing (therefore less
fault-prone) and shorter. Also fixes Debian bug #560011 -- the manual
parsing did not catch all syntax variants.
Also add some comments before /etc/apt/sources.list generation in the
Ubuntu hooks.
This was broken by a previous patch, the if statement looked for
a foler that doesn't exist on karmic, but did on prior release,
since ttys are no longer in /etc/event.d, but instead in /etc/init
/etc/event.d -> /etc/init
If nameserver config option is not set (default value), copy Dom0's
/etc/resolv.conf on guest.
Provide a role to show how to customize /etc/resolv.conf in guest.
This makes t/no-tabs.t pass.
I'm responsible for some tabs in previous patches, so this
fixes mine also :)
Note that I find this test silly, but "dura lex, sed lex"...
Temporarily use resolv.conf from dom0 when chrooting into domU,
to be able to run apt-get and yum inside chroot.
This permits to use different nameservers in domU, and does not
break install nor offline update from dom0.