Changeset 15631


Ignore:
Timestamp:
Dec 29, 2005, 4:43:03 PM (14 years ago)
Author:
jmpp
Message:

Bug: 6258
Submitted by: dluke@
Reviewed by: jmpp@

The script now uses a lock file to check for an already running indexing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/IndexRegen.sh

    r15338 r15631  
    66# e-mail: jmpp@opendarwin.org
    77# Updated by Paul Guyot, <pguyot@kallisys.net>
    8 # $Id: IndexRegen.sh,v 1.1 2005/12/06 20:47:42 jmpp Exp $
     8# $Id: IndexRegen.sh,v 1.2 2005/12/29 16:43:03 jmpp Exp $
    99####
    1010
    1111# Configuration
     12LOCKFILE=/tmp/.dp_index_regen.lock
    1213# ROOT directory, where everything is. This must exist.
    1314ROOT=/Users/pguyot/dp-portindex
     
    4748# The date.
    4849DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
     50
     51if [ ! -e $LOCKFILE ]; then
     52        touch $LOCKFILE
     53else
     54        echo "Index Regen lockfile found, is another index regen running?"
     55        exit 1
     56fi
    4957
    5058# Create the SSH wrapper if it doesn't exist (comment this for -d /Volumes...)
     
    141149fi
    142150
     151rm -f $LOCKFILE
Note: See TracChangeset for help on using the changeset viewer.