/[gnats]/gnats/debian/scripts/addconfig
ViewVC logotype

Diff of /gnats/debian/scripts/addconfig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by pdm, Sun Jul 29 17:07:59 2001 UTC revision 1.5 by pdm, Sun Dec 23 20:20:15 2001 UTC
# Line 8  set -e Line 8  set -e
8  #  #
9    
10  #  #
11  # Give some advice when configuring GNATS for the first time  # Add symlink to the standard database
12  #  #
13    
14  if [ "$1" = configure ] && [ -z "$2" ]; then  if [ "$1" = configure ] && [ ! -e /etc/gnats/db-config/default ]; then
15    db_input low gnats/confinfo || true    ln -sf $GNATSADMDIR /etc/gnats/db-config/default
   db_go  
16  fi  fi
17    
18  #  #
19  # Add symlink to standard database  # Create new database if necessary
20  #  #
21    
22  if [ "$1" = configure ] && [ ! -e /etc/gnats/db-config/standard ]; then  if [ "$1" == configure ]; then
23    ln -sf /var/lib/gnats/gnats-db/gnats-adm /etc/gnats/db-config/standard    if [ $(grep -c '^default:' $CONFIGDIR/databases) -gt 0 ] \
24  fi       && [ ! -d "$GNATSADMDIR" ]; then
25        if [ -d "$GNATSDBDIR" ]; then
26  #        mv $GNATSDBDIR $GNATSDBDIR.old
 # Create new configuration files if necesary  
 #  
   
 if [ -d "$GNATSADMDIR" ]; then  
   for F in $(ls $DEFAULTSDIR); do  
     TARGET="$GNATSADMDIR/$F"  
     if [ ! -f "$TARGET" ]; then  
       cp "$DEFAULTSDIR"/$F "$TARGET"  
       chown gnats.gnats "$TARGET"  
27      fi      fi
28    done      /usr/lib/gnats/mkdb default
29    if mkdir $GNATSADMDIR/locks 2>/dev/null; then      chown -R gnats.gnats $GNATSDBDIR
     chown gnats.gnats $GNATSADMDIR/locks  
30    fi    fi
31  fi  fi

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26