Changeset 66d2766


Ignore:
Timestamp:
07/30/13 08:47:14 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
4f9718b
Parents:
366eb6a
Message:

Add some logging functionality to lpreserver

Location:
src-sh/lpreserver/backend
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/functions.sh

    r583ccad r66d2766  
    1212# Location of settings  
    1313DBDIR="/var/db/lpreserver" 
     14LOGDIR="/var/log" 
     15export DBDIR LOGDIR PROGDIR 
    1416 
    1517#Set our Options 
     
    105107} 
    106108 
     109echo_log() { 
     110   echo "`date`: $@" >> ${LOGDIR}/lpreserver.log  
     111} 
  • src-sh/lpreserver/backend/runsnap.sh

    r583ccad r66d2766  
    1818 
    1919# Create the snapshot now with the "auto-" tag 
     20echo_log "Creating snapshot on ${DATASET}" 
    2021mkZFSSnap "${DATASET}" "auto-" 
    2122 
     
    4243   num=`expr $num + 1` 
    4344   if [ $num -gt $KEEP ] ; then 
    44       echo "Pruning old snapshot: $snap" 
     45      echo_log "Pruning old snapshot: $snap" 
    4546      rmZFSSnap "${DATASET}" "$snap" 
    4647   fi 
Note: See TracChangeset for help on using the changeset viewer.