Ignore:
Timestamp:
08/22/13 12:17:32 (11 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
197bdbf
Parents:
629cca35
Message:

Add rc_halt() to our SH functions, remove it from pc-updatemanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-updatemanager/pc-updatemanager

    rf967699 r65fd04b2  
    7777 
    7878        exit 1 
    79 } 
    80  
    81 # Run-command, don't halt if command exits with non-0 
    82 rc_nohalt() 
    83 { 
    84   CMD="$1" 
    85   
    86   if [ -z "${CMD}" ] ; then 
    87     exit_err "Error: missing argument in rc_nohalt()" 
    88   fi 
    89  
    90   ${CMD} 
    91 } 
    92  
    93 # Run-command, halt if command exits with non-0 
    94 rc_halt() 
    95 { 
    96   CMD="$@" 
    97  
    98   if [ -z "${CMD}" ] ; then 
    99     exit_err "Error: missing argument in rc_halt()" 
    100   fi 
    101  
    102   ${CMD} 
    103   STATUS=$? 
    104   if [ ${STATUS} -ne 0 ] ; then 
    105     exit_err "Error ${STATUS}: ${CMD}" 
    106   fi 
    10779} 
    10880 
Note: See TracChangeset for help on using the changeset viewer.