Skip to content

Commit

Permalink
ifup: fix exit code override when systemd in picture
Browse files Browse the repository at this point in the history
  • Loading branch information
kmroz authored and mtomaschewski committed Sep 15, 2014
1 parent af42097 commit 7499247
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions client/ifreload.c
Expand Up @@ -346,11 +346,11 @@ ni_do_ifreload_direct(int argc, char **argv)
status = ni_ifstatus_display_result(fsm, &ifnames, &up_marked,
opt_transient);

/* Do not report any transient errors to systemd (e.g. dhcp
* or whatever not ready in time) -- returning an error may
* cause to stop the network completely.
/*
* Do not report any errors to systemd -- returning an error
* here, will cause sytemd to stop the network completely.
*/
if (!opt_systemd)
if (opt_systemd)
status = NI_LSB_RC_SUCCESS;
}
}
Expand Down Expand Up @@ -666,11 +666,11 @@ ni_do_ifreload_nanny(int argc, char **argv)
status = ni_ifstatus_display_result(fsm, &ifnames, &up_marked,
opt_transient);

/* Do not report any transient errors to systemd (e.g. dhcp
* or whatever not ready in time) -- returning an error may
* cause to stop the network completely.
/*
* Do not report any errors to systemd -- returning an error
* here, will cause sytemd to stop the network completely.
*/
if (!opt_systemd)
if (opt_systemd)
status = NI_LSB_RC_SUCCESS;
}
else {
Expand Down
16 changes: 8 additions & 8 deletions client/ifup.c
Expand Up @@ -626,11 +626,11 @@ ni_do_ifup_nanny(int argc, char **argv)
status = ni_ifstatus_display_result(fsm, &ifnames, &ifmarked,
opt_transient);

/* Do not report any transient errors to systemd (e.g. dhcp
* or whatever not ready in time) -- returning an error may
* cause to stop the network completely.
/*
* Do not report any errors to systemd -- returning an error
* here, will cause sytemd to stop the network completely.
*/
if (!opt_systemd)
if (opt_systemd)
status = NI_LSB_RC_SUCCESS;

cleanup:
Expand Down Expand Up @@ -900,11 +900,11 @@ ni_do_ifup_direct(int argc, char **argv)
status = ni_ifstatus_display_result(fsm, &ifnames, &ifmarked,
opt_transient);

/* Do not report any transient errors to systemd (e.g. dhcp
* or whatever not ready in time) -- returning an error may
* cause to stop the network completely.
/*
* Do not report any errors to systemd -- returning an error
* here, will cause sytemd to stop the network completely.
*/
if (!opt_systemd)
if (opt_systemd)
status = NI_LSB_RC_SUCCESS;
}

Expand Down

0 comments on commit 7499247

Please sign in to comment.