same action in then as in else: explanation?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting same action in then as in else: explanation?
# 1  
Old 10-13-2009
same action in then as in else: explanation?

in /etc/init.d/networking of an ubuntu computer, I found this code:
Code:
            if ifdown -a --exclude=lo; then
                log_action_end_msg $?
            else
                log_action_end_msg $?
            fi

Shouldn't it be replace by
Code:
  ifdown -a --exclude=lo
  log_action_end_msg $?

Thanks

Raphaël

Last edited by pludi; 10-13-2009 at 08:57 AM.. Reason: code tags please...
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compare file name and take action

Have some files in /tmp/dir abc.zip 123.zip 345.zip and if name matches to 345.zip then take action My code.... am i doing something wrong ? Please advise. #!/bin/bash set -x cd /tmp/dir for i in *.* do if ] then (4 Replies)
Discussion started by: abhaydas
4 Replies

2. Shell Programming and Scripting

multiple action!

lets explain it easy by showing the initial file and desired file: I've a file such this that contains: initial_file: 31/12/2011 23:46:08 38.6762 43.689 14.16 Ml 3.1 ... (1 Reply)
Discussion started by: oreka18
1 Replies

3. Shell Programming and Scripting

split an action in groups

Hi all, I need some help with a script I would like to amend.Let's say it's a simple script like the one below controls=`grep line /etc/file |grep -v "^#"| awk -F":" '{print $4}'` for cc in $controls do echo $cc sleep 2 done cc variable holds a list of 40 numbers.... (2 Replies)
Discussion started by: geovas
2 Replies

4. Shell Programming and Scripting

Need help with find its action

I am writing a shell script that takes at least 2 arguments. The first is an octal representation of file permissions, the second is a command that is executed on all the files found with that permission. #!/bin/sh find . -perm $1 -exec $2 $3 $4 {} \; invoked: ./script.sh 543 ls -la what... (3 Replies)
Discussion started by: computethis
3 Replies

5. UNIX for Advanced & Expert Users

tracking user action

Hi, we are using solaris8. we have some files disappear. I would like to know how to track who and when the files was remove ??? thanks, (7 Replies)
Discussion started by: xitrum
7 Replies

6. Shell Programming and Scripting

action command

Hi.. When i refered the script /etc/rc.sysinit... i found the "action commands" like But this is not working in my shells.. the following error is coming... Please anybody help Thanks in advance esham (5 Replies)
Discussion started by: esham
5 Replies
Login or Register to Ask a Question
UBUNTU-BUILD(1) 					      General Commands Manual						   UBUNTU-BUILD(1)

NAME
ubuntu-build - command-line interface to Launchpad build operations SYNOPSIS
ubuntu-build <srcpackage> <release> <operation> DESCRIPTION
ubuntu-build provides a command line interface to the Launchpad build operations. OPERATIONS
Listed below are the available operations for ubuntu-build: status Outputs the build status of the package on Launchpad on all architectures. retry Requests that the package has another attempt at rebuilding from source. This will only work if the package has Failed to build on Launchpad. rescore Requests that the package's build priority be raised in the build queue. Only members of the Launchpad build administrators may issue this operation, and it may only be performed on packages which Need building. OPTIONS
Listed below are the command line options for ubuntu-build: -h or --help Display a help message and exit. Retry and rescore options: These options may only be used with the 'retry' and 'rescore' operations. -a ARCHITECTURE, --arch=ARCHITECTURE Rebuild or rescore a specific architecture. Valid architectures include: amd64, sparc, powerpc, i386, armel, armhf, ia64, lpia, hppa. Batch processing: These options and parameter ordering is only available in --batch mode. Usage: ubuntu-build --batch [options] <package>... --batch Enable batch mode --series=SERIES Selects the Ubuntu series to operate on (default: current development series) --retry Retry builds (give-back). --rescore=PRIORITY Rescore builds to <priority>. --arch2=ARCHITECTURE Affect only 'architecture' (can be used several times). Valid architectures are: amd64, sparc, powerpc, i386, armel, armhf, ia64, lpia, hppa. AUTHORS
ubuntu-build was written by Martin Pitt <martin.pitt@canonical.com>, and this manual page was written by Jonathan Patrick Davies <jpds@ubuntu.com>. Both are released under the terms of the GNU General Public License, version 3 or (at your option) any later version. ubuntu-dev-tools June 2010 UBUNTU-BUILD(1)