Darryl L. Pierce
2008-Jun-26 13:11 UTC
[Ovirt-devel] [PATCH] UUID for now is the FQ hostname of the managed node.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- ovirt-host-creator/common-pkgs.ks | 1 + ovirt-host-creator/common-post.ks | 1 + ovirt-managed-node/src/ovirt-identify-node.c | 7 ++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ovirt-host-creator/common-pkgs.ks b/ovirt-host-creator/common-pkgs.ks index 6fe4f26..3ad8fa0 100644 --- a/ovirt-host-creator/common-pkgs.ks +++ b/ovirt-host-creator/common-pkgs.ks @@ -26,6 +26,7 @@ augeas nc bind-utils syslinux +dmidecode ovirt-managed-node -policycoreutils -audit-libs-python diff --git a/ovirt-host-creator/common-post.ks b/ovirt-host-creator/common-post.ks index a7dc987..c7566a8 100644 --- a/ovirt-host-creator/common-post.ks +++ b/ovirt-host-creator/common-post.ks @@ -237,6 +237,7 @@ start() { echo -n $"Starting ovirt-post: " find_srv identify tcp + ovirt-identify-node -s $SRV_HOST -p $SRV_PORT success diff --git a/ovirt-managed-node/src/ovirt-identify-node.c b/ovirt-managed-node/src/ovirt-identify-node.c index 41dfec3..b882b55 100644 --- a/ovirt-managed-node/src/ovirt-identify-node.c +++ b/ovirt-managed-node/src/ovirt-identify-node.c @@ -53,7 +53,7 @@ char uuid[VIR_UUID_BUFLEN]; char memsize[BUFFER_LENGTH]; char numcpus[BUFFER_LENGTH]; char cpuspeed[BUFFER_LENGTH]; -char hostname[256]; +char* hostname; int hostport = -1; int socketfd; @@ -124,14 +124,15 @@ int config(int argc,char** argv) int result = 0; int option; - while((option = getopt(argc,argv,"s:p:dvth")) != -1) + while((option = getopt(argc,argv,"s:p:u:dvth")) != -1) { if(debug) fprintf(stdout,"Processing argument: %c (optarg:%s)\n",option,optarg); switch(option) { - case 's': strcpy(hostname,optarg); break; + case 's': hostname = optarg; break; case 'p': hostport = atoi(optarg); break; + case 'u': strcpy(uuid,optarg); break; case 't': testing = 1; break; case 'd': debug = 1; break; case 'v': verbose = 1; break; -- 1.5.5.1