Changeset 2644

Show
Ignore:
Timestamp:
12/19/07 15:28:40 (1 year ago)
Author:
dhozac
Message:

Use/support the "new" vclone features in the clone build method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/scripts/vserver-build

    r2468 r2644  
    7575    rsync       ... -- [-d <distribution>] --source <source> [-o <rsync option>]* 
    7676                ...  installs a guest by rsyncing from <source> to the guest root 
    77     clone       ... -- [-d <distribution>] --source <source> 
     77    clone       ... -- [-d <distribution>] --source <source> [--exclude-from <exclude-list>] 
    7878                ...  clones a guest by linking unified files and copying the rest 
    7979 
  • trunk/scripts/vserver-build.clone

    r2494 r2644  
    1616# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    1717 
    18 tmp=$(getopt -o '+d:s:o:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 
     18tmp=$(getopt -o '+d:s:o:X:' --long debug,pkgmgmt,source:,exclude-from: -n "$0" -- "$@") || exit 1 
    1919eval set -- "$tmp" 
    2020 
     
    2424use_pkgmgmt= 
    2525SOURCE= 
     26EXCLUDES= 
    2627while true; do 
    2728    case "$1" in 
     
    3031        --pkgmgmt)      use_pkgmgmt=1;; 
    3132        -s|--source)    SOURCE=$2; shift;; 
     33        -X|--exclude-from) 
     34                        EXCLUDES=$2; shift;; 
    3235        --)             shift; break ;; 
    3336        *)              echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 
     
    6467test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS" 
    6568 
    66 $_VCLONE "$SOURCE"/ "$VDIR"/ 
     69$_VCLONE ${SETUP_CONTEXT:+--xid "$SETUP_CONTEXT"} \ 
     70         ${EXCLUDES:+--exclude-from "$EXCLUDES"} \ 
     71         "$SOURCE"/ "$VDIR"/ 
    6772 
    6873test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"