Changeset 2610

Show
Ignore:
Timestamp:
09/06/07 19:48:35 (1 year ago)
Author:
dhozac
Message:

Unbreak dynamic contexts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/scripts/vserver.functions

    r2599 r2610  
    612612    local tag 
    613613 
    614     getFileValue tag "$vdir/tag" "$vdir/context" || return 0 
     614    getFileValue tag "$vdir/tag" "$vdir/context" 
     615    test -n "$tag" || return 0 
    615616 
    616617    OPTS_VTAG_CREATE=( --tag "$tag" ) 
  • trunk/src/vtag.c

    r2599 r2610  
    110110      goto exec; 
    111111  } 
     112  if (args->tag == VC_DYNAMIC_XID) { 
     113    if (args->verbosity >= 1) { 
     114      WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n"); 
     115      return wrapper_exit_code; 
     116    } 
     117    else { 
     118      WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "WARNING: A dynamic tag has been specified, this is not supported\n"); 
     119      goto exec; 
     120    } 
     121  } 
    112122 
    113123  if (args->do_create) { 
     
    141151{ 
    142152  struct Arguments              args = { 
    143     .tag               = VC_NOCTX
     153    .tag               = VC_DYNAMIC_XID
    144154    .do_create         = false, 
    145155    .do_migrate        = false, 
     
    174184  else if (args.do_create && args.do_migrate) 
    175185    WRITE_MSG(2, "Can not specify '--create' and '--migrate' at the same time; try '--help' for more information\n"); 
    176   else if (args.tag==VC_NOCTX) 
    177     WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n"); 
    178186  else if (optind>=argc) 
    179187    WRITE_MSG(2, "No command given; use '--help' for more information.\n");