package/ifupdown-scripts: do not expect localhost to precede DHCP
Currently, we always suppose that localhost settings will always come
before the (optional) DHCP ones. This is always true when using
sysvinit/busybox or systemd.
However, with openrc, this will no longer be the case: only the DHCP
settings will be present (OpenRC handles lo on his own).
So, prepare the macros to be independent one from the other, and for
symetry, in both:
- use append-redirection >> to populate the interfaces file,
- prepend a leading empty line at the beginning of each section.
The origianl singe '>' redirection would ensure the file would not grow
on a reinstall, but that's no longer the case, so reset the file prior
to filling it, using the canned preamble.
Signed-off-by: Carlos Santos <unixmania@gmail.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>