Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are some strange code:

    if ifup -a --exclude=lo; then
        log_action_end_msg $?
        log_action_end_msg $?

both variants have exactly same code:

        log_action_end_msg $?

Why need "if", "then", "else", "fi"? Why not simple:

    ifup -a --exclude=lo
    log_action_end_msg $?

There are 3 times such code in this file.

This file belongs to "netbase" 4.35ubuntu3

share|improve this question
logically it is the same – yossile Mar 25 '12 at 13:26

You are right that the if statement appears to be unnecessary. My guess is that the two branches of the if statement did different things in an older version, but the two branches were modified to their current form at some point.

If it bothers you, I'd suggest filing a bug.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.