Changeset 1286
- Timestamp:
- 03/19/10 14:54:16 (23 months ago)
- Files:
-
- 1 modified
-
trunk/tools/datacenter/vzImport.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/datacenter/vzImport.sh
r1285 r1286 23 23 uCreatedBy=1; 24 24 # CTID NPROC STATUS IP_ADDR HOSTNAME 25 # 181 48 running 174. 121.136.100 ns1.ringcarrier.com25 # 181 48 running 174.34.136.100 ns1.singtone.com 26 26 vzlist -a | \ 27 27 while read cvzlist … … 42 42 echo cLabel=$cLabel; 43 43 echo cHostname=$cHostname; 44 #uVeth=0; 45 #uIPv4= from select of first available tIP.uIP then we need to mark unavailble in 2nd query. 44 #uVeth=0; default is 0 so we can even omit this from insert query. 45 #uIPv4= from select Must preload tIP with the clone range from source unxsVZ db. 46 echo $cIP; 46 47 #uOSTemplate from select. Must preload tOSTemplate from mysqldump of source unxsVZ db. 47 48 echo cOSTemplate=$cOSTemplate; … … 61 62 echo ""; 62 63 63 #cQuery="INSERT INTO tContainer SET uContainer=$uContainer,cLabel='$cLabel',uIPv4=(SELECT uIP FROM tIP WHERE cLabel='$cIP' ),uOSTemplate=(SELECT uOSTemplate FROM tOSTemplate WHERE cLabel='$cOSTemplate'),uConfig=(SELECT uConfig FROM tConfig WHERE cLabel='$cConfig',uNameserver=$uNameserver,uSearchdomain=(SELECT uSearchdomain FROM tSearchdomain WHERE cLabel='$cSearchdomain',uDatacenter=$uDatacenter,uNode=$uNode,uStatus=$uStatus,uOwner=$uOwner,uCreatedBy=$uCreatedBy,uCreatedDate=UNIX_TIMESTAMP(NOW())";64 #cQuery="INSERT INTO tContainer SET uContainer=$uContainer,cLabel='$cLabel',uIPv4=(SELECT uIP FROM tIP WHERE cLabel='$cIP' AND uAvailable=1),uOSTemplate=(SELECT uOSTemplate FROM tOSTemplate WHERE cLabel='$cOSTemplate'),uConfig=(SELECT uConfig FROM tConfig WHERE cLabel='$cConfig',uNameserver=$uNameserver,uSearchdomain=$uSearchdomain,uDatacenter=$uDatacenter,uNode=$uNode,uStatus=$uStatus,uOwner=$uOwner,uCreatedBy=$uCreatedBy,uCreatedDate=UNIX_TIMESTAMP(NOW())"; 64 65 # echo $cQuery; 65 66 done
