Re: initdb and data directories with lost+found - Mailing list pgsql-hackers

From Tom Lane
Subject Re: initdb and data directories with lost+found
Date
Msg-id 10159.985280929@sss.pgh.pa.us
Whole thread Raw
In response to initdb and data directories with lost+found  (Steve Stock <steve@technolope.org>)
List pgsql-hackers
Steve Stock <steve@technolope.org> writes:
> --- src/bin/initdb/initdb.sh    2001/03/13 21:37:15     1.122
> +++ src/bin/initdb/initdb.sh    2001/03/22 15:45:46
> @@ -402,7 +402,7 @@
>  # find out if directory is empty
>  pgdata_contents=`ls -A "$PGDATA" 2>/dev/null`
> -if [ x"$pgdata_contents" != x ]
> +if [ x"$pgdata_contents" != x -a "$pgdata_contents" != "lost+found" ]
>  then
>      (
>        echo "$CMDNAME: The directory $PGDATA exists but is not empty."

> This fix works for ext2, but will (obviously) not work if the filesystem
> uses something other than "lost+found".

AFAIK that name is universally used.  Seems like a reasonable change to
me; Peter, do you agree?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: initdb and data directories with lost+found
Next
From: Tom Lane
Date:
Subject: Re: Missing operator for numeric comparison