Changeset 190 for freebsd-mgnt


Ignore:
Timestamp:
Oct 2, 2010, 3:13:06 PM (14 years ago)
Author:
Rick van der Zwet
Message:

Only ask if deamon needs to be stopped/started

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-mgnt/system-update.sh

    r185 r190  
    6868  #
    6969  # Stop daemons
    70   echo $RC_FILES
    71   ask_question "Do you like to stop your deamons" "yes" || exit
    72   for RC_FILE in $RC_FILES; do
    73     $RC_FILE stop
    74   done
    75 
     70  if [ -n "$RC_FILES" ]; then
     71    echo $RC_FILES
     72    ask_question "Do you like to stop your deamons" "yes" || exit
     73    for RC_FILE in $RC_FILES; do
     74      $RC_FILE stop
     75    done
     76  fi
    7677fi
    7778portupgrade -r -mBATCH=yes -a $NEWPORTS
     
    7980#
    8081# Restart daemons
    81 echo $RC_FILES
    82 ask_question "Do you like to restart your deamons" "yes" || exit
    83 for RC_FILE in $RC_FILES; do
    84   $RC_FILE restart
    85 done
    86 
     82if [ -n "$RC_FILES" ]; then
     83  echo $RC_FILES
     84  ask_question "Do you like to restart your deamons" "yes" || exit
     85  for RC_FILE in $RC_FILES; do
     86    $RC_FILE restart
     87  done
     88fi
Note: See TracChangeset for help on using the changeset viewer.