Commit 7a1f1962 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add test to see if /proj/foo exists before trying to mkdir it.

parent 94b8349c
......@@ -86,8 +86,10 @@ else {
#
print STDOUT "Mounting the project directory on $PROJDIR/$project ... \n";
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
if (! -e "$PROJDIR/$project") {
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
}
}
if (system("$MOUNTCMD/$project $PROJDIR/$project") != 0) {
......
......@@ -86,8 +86,10 @@ else {
#
print STDOUT "Mounting the project directory on $PROJDIR/$project ... \n";
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
if (! -e "$PROJDIR/$project") {
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
}
}
if (system("$MOUNTCMD/$project $PROJDIR/$project") != 0) {
......
......@@ -84,8 +84,10 @@ else {
#
print STDOUT "Mounting the project directory on $PROJDIR/$project ... \n";
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
if (! -e "$PROJDIR/$project") {
if (! mkdir("$PROJDIR/$project", 0770)) {
print STDERR "Could not make directory $PROJDIR/$project: $!\n";
}
}
if (system("$MOUNTCMD/$project $PROJDIR/$project") != 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment