Bug 182938 - feature request - new command for nash: on_success
feature request - new command for nash: on_success
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
: Reopened
Depends On:
Blocks: 197695
  Show dependency treegraph
Reported: 2006-02-24 11:53 EST by Don Zickus
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 5.0.47-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-13 13:13:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tiny fix for condCommand (438 bytes, patch)
2006-05-17 18:28 EDT, Don Zickus
no flags Details | Diff

  None (edit)
Description Don Zickus 2006-02-24 11:53:59 EST
Description of problem:
We talked about adding this command previously.  Just to refresh, I wanted to
add the command "on_success" that would only continue upon success (return code
0) of the previous command.

This will be used with the kdump/kexec project.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  find a project that needs to use nash
2.  convince yourself that you need conditionals
3.  viola!!  feature request.
Actual results:

Expected results:

Additional info:
Comment 1 Peter Jones 2006-03-30 18:19:21 EST
This is implemented in 5.033-1 as the "cond" command.

example usage:

foo            # run "foo"
cond bar       # if foo returned 0, run "bar" 
foo            # run "foo"
cond -ne 0 bar # if foo returned anything but 0, run "bar"

In addition to "-ne", "-eq", "-lt", "-le", "-ge", and "-gt" are provided.  Their
meaning is left to the reader.
Comment 2 Don Zickus 2006-05-17 18:28:59 EDT
Created attachment 129371 [details]
tiny fix for condCommand

simple little fix... not so simple to find
Comment 3 Don Zickus 2006-05-17 18:30:18 EDT
another nitpick is the -eq is coded as -et but whatever..
Comment 5 Peter Jones 2006-07-11 10:09:35 EDT
Fixed in CVS, will be in the next build.  Also added "-eq" (but left "-et" in
for compatibility).

Note You need to log in before you can comment on or make changes to this bug.