#!/bin/sh 
# BLURB gpl
# 
#                            Coda File System
#                               Release 6
# 
#           Copyright (c) 1987-2003 Carnegie Mellon University
#                   Additional copyrights listed below
# 
# This  code  is  distributed "AS IS" without warranty of any kind under
# the terms of the GNU General Public Licence Version 2, as shown in the
# file  LICENSE.  The  technical and financial  contributors to Coda are
# listed in the file CREDITS.
# 
#                         Additional copyrights
#                            none currently
# 
#*/

echon() {
    if [ "`echo -n`" ] ; then
        echo "$@"\c
    else
        echo -n "$@"
    fi
}

echo This will permanently remove all Coda volumes from your system.
echon 'This is useful for a clean start. Proceed? [Y/n]: '

read answer 

if [  x$answer = xn -o x$answer = xno -o x$answer = xN -o x$answer = xNo ]; then
    echo No harm done.
    exit 1    
fi

rm -f /vice/db/VRDB /vice/db/VLDB 
rm -f /vice/vol/RWList /vice/vol/AllVolumes /vice/vol/VolumeList /vice/db/VRList
echo Volume databases removed.
