[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnats/384: mkdb should fail for a remote database
From: |
Lars . Henriksen |
Subject: |
gnats/384: mkdb should fail for a remote database |
Date: |
Sun, 26 May 2002 09:18:30 -0400 |
>Number: 384
>Category: gnats
>Synopsis: mkdb should fail for a remote database
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 26 09:18:30 -0400 2002
>Originator: Lars Henriksen
>Release: 4.0-beta1
>Organization:
>Environment:
>Description:
The databases file may describe local as well as remote databases.
The mkdb command should only work for local databases.
At present the last field of the database entry is used unconditionally.
Minimal fix attached.
>How-To-Repeat:
>Fix:
Index: mkdb.sh
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/mkdb.sh,v
retrieving revision 1.7
diff -u -r1.7 mkdb.sh
--- mkdb.sh 2 Dec 2001 14:39:09 -0000 1.7
+++ mkdb.sh 26 May 2002 12:56:21 -0000
@@ -58,10 +58,10 @@
exit 1;
fi
-dbdir=`grep "^${database}:" $DATABASES | sed 's/^.*:\([^:]*\)$/\1/'`
+dbdir=`grep "^${database}:" $DATABASES | sed -n
's/^'${database}':[^:]*:\([^:]*\)$/\1/p'`
if [ -z "${dbdir}" ]
then
- echo "$prog: No proper entry for \`${database}' in \`$DATABASES'."
+ echo "$prog: No proper entry for \`${database}' in \`$DATABASES':\n"`grep
"^${database}:" $DATABASES`
exit 1
fi
>Unformatted:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnats/384: mkdb should fail for a remote database,
Lars . Henriksen <=