IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2010, 8:40:56 AM (16 years ago)
Author:
bills
Message:

check for existence of src file and destintation directory and print out a better error message
if something goes wrong. Previously inaccessible partititions would generate obscure
'cannot symlink' messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStoreServer/scripts/dsreg

    r27230 r28789  
    270270            die("failed trying to create fileset directory $fileset_dir");
    271271        }
     272        if (! -d $fileset_dir ) {
     273            die("cannot access just created fileset directory $fileset_dir");
     274        }
    272275    }
    273276
     
    328331                    my $dest = "$fileset_dir/$filename";
    329332
     333                    if ( !-e $src or !-r $src) {
     334                        print STDERR "file $src does not exist or is not accessible\n";
     335                        exit $PS_EXIT_SYS_ERROR;
     336                    }
    330337                    if ($linkfiles) {
    331338                        if (! symlink $src, $dest) {
    332                             die("failed trying to link $src to $dest");
     339                            print STDERR "failed trying to link $src to $dest\n";
     340                            exit $PS_EXIT_SYS_ERROR;
    333341                        }
    334342                    } else {
Note: See TracChangeset for help on using the changeset viewer.