lifecycle: add pre-down/post-up to match debian ifupdown
This commit is contained in:
parent
5013dcf6c9
commit
933332a6cb
1 changed files with 6 additions and 0 deletions
|
@ -214,10 +214,16 @@ lif_lifecycle_run(const struct lif_execute_opts *opts, struct lif_interface *ifa
|
||||||
if (!lif_lifecycle_run_phase(opts, iface, "up", lifname, up))
|
if (!lif_lifecycle_run_phase(opts, iface, "up", lifname, up))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!lif_lifecycle_run_phase(opts, iface, "post-up", lifname, up))
|
||||||
|
return false;
|
||||||
|
|
||||||
lif_state_upsert(state, lifname, iface);
|
lif_state_upsert(state, lifname, iface);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!lif_lifecycle_run_phase(opts, iface, "pre-down", lifname, up))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!lif_lifecycle_run_phase(opts, iface, "down", lifname, up))
|
if (!lif_lifecycle_run_phase(opts, iface, "down", lifname, up))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue