Changeset 286


Ignore:
Timestamp:
Mar 9, 2009, 5:39:15 PM (16 years ago)
Author:
joergs
Message:

make permission file configuable

Location:
trunk/dasscm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dasscm/dasscm

    r285 r286  
    3333my $RETURN_UNKNOWN = 3;
    3434
    35 # file to store permissions
    36 my $permissions_file = "/etc/permissions.d/dasscm.permission_backup";
    3735
    3836# documentation file (for usage)
     
    5149my $DASSCM_CHECKOUT_USERNAME;
    5250my $DASSCM_CHECKOUT_PASSWORD;
     51my $DASSCM_PERMISSION_FILE;
    5352
    5453# current directory at program start
     
    786785    my $retcode =
    787786      run_interactive(
    788         "cd $DASSCM_LOCAL_REPOSITORY_BASE; $SVN checkout $svnCheckoutCredentials $svnOptions $DASSCM_SVN_REPOSITORY; mkdir -p `dirname $permissions_file`; touch $permissions_file"
     787        "cd $DASSCM_LOCAL_REPOSITORY_BASE; $SVN checkout $svnCheckoutCredentials $svnOptions $DASSCM_SVN_REPOSITORY; mkdir -p `dirname $DASSCM_PERMISSION_FILE`; touch $DASSCM_PERMISSION_FILE"
    789788      );
    790789}
     
    905904
    906905    # add permissions file
    907     add_helper($permissions_file);
     906    add_helper($DASSCM_PERMISSION_FILE);
    908907
    909908    if ( $options{'message'} ) {
     
    968967
    969968    # add permissions file
    970     add_helper($permissions_file);
     969    add_helper($DASSCM_PERMISSION_FILE);
    971970
    972971    if ( $options{'message'} ) {
     
    11541153        my $tofile = 0;    # Status für schreiben in File
    11551154
    1156         if ( -w dirname($permissions_file) ) {
     1155        if ( -w dirname($DASSCM_PERMISSION_FILE) ) {
    11571156
    11581157            # Verzeichnis existiert => schreiben
    1159             open( OUTFILE, ">$permissions_file" )
    1160               || die("failed to write to $permissions_file: $!");
     1158            open( OUTFILE, ">$DASSCM_PERMISSION_FILE" )
     1159              || die("failed to write to $DASSCM_PERMISSION_FILE: $!");
    11611160            $tofile = 1;    # Merken, daß in File geschrieben wird
    11621161            print OUTFILE "#\n";
     
    12371236          " --username $DASSCM_CHECKOUT_USERNAME --password $DASSCM_CHECKOUT_PASSWORD ";
    12381237    }
     1238
     1239    $DASSCM_PERMISSION_FILE = $config->{'DASSCM_PERMISSION_FILE'} || "/etc/permissions.d/dasscm.permission_backup";
    12391240
    12401241    # get command line options and store them in options hash
  • trunk/dasscm/dasscm.conf

    r255 r286  
    3232#DASSCM_CHECKOUT_USERNAME=dasscm
    3333#DASSCM_CHECKOUT_PASSWORD=
     34
     35#
     36# file to store the permissions of the checked-in file
     37#
     38DASSCM_PERMISSION_FILE="/etc/permissions.d/dasscm.permission_backup"
Note: See TracChangeset for help on using the changeset viewer.