Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit fccb01f

Browse files
aderumiervholer
authored andcommitted
F #-: debian: add ifupdown2 support
ifupdown2 is an alternative to classic ifupdown https://github.com/CumulusNetworks/ifupdown2 It's allow to reload online network configuration with dependencies and 100% compatible with classic ifupdown1 config. Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 parent 2c7775c commit fccb01f

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/etc/one-context.d/loc-10-network##deb.one

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ configure_network()
289289

290290
deactivate_network()
291291
{
292+
293+
if test -f "/usr/sbin/ifreload"; then
294+
return
295+
fi
296+
292297
IFACES=`/sbin/ifquery --list -a`
293298

294299
for i in $IFACES; do
@@ -301,6 +306,12 @@ deactivate_network()
301306

302307
activate_network()
303308
{
309+
310+
if test -f "/usr/sbin/ifreload"; then
311+
/usr/sbin/ifreload -a
312+
return
313+
fi
314+
304315
IFACES=`/sbin/ifquery --list -a`
305316

306317
for i in $IFACES; do

targets.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ case "${TARGET}" in
176176
RELSUFFIX=${RELSUFFIX:-}
177177
TYPE=${TYPE:-deb}
178178
TAGS=${TAGS:-deb sysv systemd upstart one}
179-
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils parted ruby ifupdown acpid sudo passwd dbus openssh-server open-vm-tools qemu-guest-agent}
179+
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils parted ruby ifupdown|ifupdown2 acpid sudo passwd dbus openssh-server open-vm-tools qemu-guest-agent}
180180
PROVIDES=${PROVIDES:-}
181181
REPLACES=${REPLACES:-cloud-init}
182182
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
@@ -191,7 +191,7 @@ case "${TARGET}" in
191191
RELSUFFIX=${RELSUFFIX:-}
192192
TYPE=${TYPE:-deb}
193193
TAGS=${TAGS:-deb sysv systemd upstart ec2}
194-
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils parted ruby ifupdown sudo passwd dbus openssh-server resolvconf}
194+
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils parted ruby ifupdown|ifupdown2 sudo passwd dbus openssh-server resolvconf}
195195
PROVIDES=${PROVIDES:-}
196196
REPLACES=${REPLACES:-cloud-init}
197197
CONFLICTS=${CONFLICTS:-${REPLACES} one-context}

0 commit comments

Comments
 (0)