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/libsh/functions.sh

    re5a54a6 r65fd04b2  
    638638  fi 
    639639} 
     640 
     641# Run-command, don't halt if command exits with non-0 
     642rc_nohalt() 
     643{ 
     644  CMD="$1" 
     645 
     646  if [ -z "${CMD}" ] ; then 
     647    exit_err "Error: missing argument in rc_nohalt()" 
     648  fi 
     649 
     650  ${CMD} 
     651} 
     652 
     653# Run-command, halt if command exits with non-0 
     654rc_halt() 
     655{ 
     656  CMD="$@" 
     657 
     658  if [ -z "${CMD}" ] ; then 
     659    exit_err "Error: missing argument in rc_halt()" 
     660  fi 
     661 
     662  ${CMD} 
     663  STATUS=$? 
     664  if [ ${STATUS} -ne 0 ] ; then 
     665    exit_err "Error ${STATUS}: ${CMD}" 
     666  fi 
     667} 
Note: See TracChangeset for help on using the changeset viewer.