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
WHAT-PATCH(1)						      General Commands Manual						     WHAT-PATCH(1)

NAME
what-patch - detect which patch system a Debian package uses SYNOPSIS
what-patch [options] DESCRIPTION
what-patch examines the debian/rules file to determine which patch system the Debian package is using. what-patch should be run from the root directory of the Debian source package. OPTIONS
Listed below are the command line options for what-patch: -h, --help Display a help message and exit. -v Enable verbose mode. This will include the listing of any files modified outside or the debian/ directory and report any additional details about the patch system if available. AUTHORS
what-patch was written by Kees Cook <kees@ubuntu.com>, Siegfried-A. Gevatter <rainct@ubuntu.com>, and Daniel Hahler <ubuntu@thequod.de>, among others. This manual page was written by Jonathan Patrick Davies <jpds@ubuntu.com>. Both are released under the GNU General Public License, version 3 or later. SEE ALSO
The Ubuntu MOTU team has some documentation about patch systems at the Ubuntu wiki: https://wiki.ubuntu.com/PackagingGuide/PatchSystems cdbs-edit-patch(1), dbs-edit-patch(1), dpatch-edit-patch(1) DEBIAN
Debian Utilities WHAT-PATCH(1)