Changeset 707

Show
Ignore:
Timestamp:
12/01/06 09:50:46 (2 years ago)
Author:
chengyu
Message:

file system type

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeybow/trunk/mwfetcher/CHANGELOG

    r705 r707  
    1 2006.11.23 
    2 1. Obsolete ntfs mount option fixed. 
     1v0.1.0 
     2* Added "-t vfat" option since the vfat file system mount option is not compatible 
     3  with ntfs or other file system.  
     4* Obsolete ntfs mount option fixed. 
     5* Refreshed README for public release. 
    36 
    4 2006.10.18 
    5 v0.1.0 
    6 1. Refreshed README for public release. 
    7  
    8 2006.09.14 
    97v0.0.9b 
    10 1. Fixed a bug in function submit_diff. 
    11 2. Removed -t ntfs option while mount virtual disk to let Liux kernel decide which 
    12   fs type to use, therefore can support more fs type. 
     8* Fixed a bug in function submit_diff. 
     9* Removed "-t ntfs" option while mount virtual disk to let Liux kernel decide which 
     10  fs type to use, therefore can support more fs type. 
  • honeybow/trunk/mwfetcher/src/mwfetcher

    r705 r707  
    2424############################################################################ 
    2525# 
    26 # Usage: mwfetcher [-m path] [-l path] [-s path] [-g file] [-f] [-M] vmxfile submit-dir 
    27 #        mwfetcher [-M] [-c config-file] -b 
    28 #        mwfetcher -i [-m path] [-s path] [-g file] [-M] vmxfile 
     26# Usage: mwfetcher [-m path] [-l path] [-s path] [-g file] [-f] [-M] [-t vfat] vmxfile submit-dir 
     27#        mwfetcher [-M] [-c config-file] [-t vfat] -b 
     28#        mwfetcher -i [-m path] [-s path] [-g file] [-M] [-t vfat] vmxfile 
    2929#        mwfetcher -v 
    3030#        mwfetcher -h 
     
    4444#                -b Use batch mode run through VM list in <config-file>. 
    4545#        -i Generate initial good file list for virtual machine <vmxfile> 
     46#                -t Sepcify the file system type, currently only FAT file system needs to 
     47#                       be specified.             
    4648# 
    4749########################################################################### 
     
    6870        local vmk_dir="$1" 
    6971        local mount_dir="$2" 
    70         local fs_type="$3" 
    7172 
    7273        echo "[MOUNT]" 
    73         echo "Mount Virtual machine disk: $vmk_dir" 
    74         echo "mount point: $mount_dir" 
    7574 
    7675        if [ -e "$home_dir"PID ]; then 
    77                 echo "$PROGRAM:Another MwFetcher is currently running, only one process is allowed" 
     76                echo "$PROGRAM: Another MwFetcher is currently running, only one process is allowed" 
    7877                exit 1 
    7978        fi 
     
    8786        fi 
    8887 
    89         local vmk_file=`ls -ct "$vmk_dir" | grep -m 1 .vmdk$ | sed '{s/-s00[0-9]//}'` 
    90         vmware-loop "$vmk_dir/$vmk_file" 1 /dev/nb0 2>&1 > /dev/null & echo $! > "$home_dir/PID" 
     88        local vmdk_file=`ls -ct "$vmk_dir" | grep -m 1 .vmdk$ | sed '{s/-s00[0-9]//}'` 
     89         
     90        echo "Mount Virtual machine disk: $vmk_dir/$vmdk_file" 
     91        echo "mount point: $mount_dir" 
     92         
     93        vmware-loop "$vmk_dir/$vmdk_file" 1 /dev/nb0 2>&1 > /dev/null & echo $! > "$home_dir/PID" 
    9194        sleep 2 
    92         mount -o ro,nls=utf8 /dev/nb0 "$mount_dir" 2>&1 > /dev/null 
     95 
     96        local option="" 
     97        if [ $fs_type = "vfat" ]; then 
     98                option="utf8" 
     99        else 
     100                option="ro,nls=utf8" 
     101        fi 
     102         
     103        mount -o "$option" /dev/nb0 "$mount_dir" 2>&1 > /dev/null 
    93104 
    94105        #echo "Finished" 
     
    267278 
    268279usage() { 
    269         echo "Usage: $PROGRAM [-m path] [-l path] [-s path] [-g file] [-f] [-M] vmxfile submit-dir" 
    270         echo "       $PROGRAM [-M] [-c config-file] -b" 
    271         echo "       $PROGRAM -i [-m path] [-s path] [-g file] [-M] vmxfile" 
     280        echo "Usage: $PROGRAM [-m path] [-l path] [-s path] [-g file] [-f] [-M] [-t vfat] vmxfile submit-dir" 
     281        echo "       $PROGRAM [-M] [-c config-file] [-t vfat] -b" 
     282        echo "       $PROGRAM -i [-m path] [-s path] [-g file] [-M] [-t vfat] vmxfile" 
    272283        echo "       $PROGRAM -v" 
    273284        echo "       $PROGRAM -h" 
     
    281292        echo -e "\t-b Use batch mode run through VM list in <config-file>." 
    282293        echo -e "\t-i Generate initial good file list for virtual machine <vmxfile>" 
     294        echo -e "\t-t Specify the file system type, currently only FAT file system needs to \n\t   be specified." 
    283295        echo -e "\t-v Version." 
    284296        echo -e "\t-h Show this message." 
     
    345357# Process options 
    346358 
    347 while getopts ":m:l:g:s:fMic:bvh" opt; do 
     359while getopts ":m:l:g:s:fMic:bt:vh" opt; do 
    348360        case $opt in 
    349361                m  )    if [ -d "$OPTARG" ]; then 
     
    371383                b  )    batch=1 ;; 
    372384                 
     385                t  )    fs_type="$OPTARG" ;; 
     386                 
    373387                v  )    version 
    374388                                exit 0 ;; 
     
    390404cfg_file=${cfg_file:-"$home_dir/config"} 
    391405batch=${batch:-0} 
     406fs_type=${fs_type:-""} 
    392407 
    393408echo "MwFetcher v$version"