From: <ta...@us...> - 2008-02-14 15:50:51
|
Revision: 3896 http://gfarm.svn.sourceforge.net/gfarm/?rev=3896&view=rev Author: tatebe Date: 2008-02-14 07:50:54 -0800 (Thu, 14 Feb 2008) Log Message: ----------- * gfsd - add -h option to specify a canonical host name. Modified Paths: -------------- gfarm/branches/gfarm_v2/doc/docbook/en/ref/man8/gfsd.8.docbook gfarm/branches/gfarm_v2/doc/docbook/ja/ref/man8/gfsd.8.docbook gfarm/branches/gfarm_v2/server/gfsd/gfsd.c Modified: gfarm/branches/gfarm_v2/doc/docbook/en/ref/man8/gfsd.8.docbook =================================================================== --- gfarm/branches/gfarm_v2/doc/docbook/en/ref/man8/gfsd.8.docbook 2008-02-13 16:20:45 UTC (rev 3895) +++ gfarm/branches/gfarm_v2/doc/docbook/en/ref/man8/gfsd.8.docbook 2008-02-14 15:50:54 UTC (rev 3896) @@ -99,6 +99,13 @@ </varlistentry> <varlistentry> +<term><option>-h</option> <parameter>hostname</parameter></term> +<listitem> +<para>Specifies my own canonical host name.</para> +</listitem> +</varlistentry> + +<varlistentry> <term><option>-l</option> <parameter>IP-address</parameter></term> <listitem> <para>Specifies the IP address from which the gfsd accepts TCP and UDP Modified: gfarm/branches/gfarm_v2/doc/docbook/ja/ref/man8/gfsd.8.docbook =================================================================== --- gfarm/branches/gfarm_v2/doc/docbook/ja/ref/man8/gfsd.8.docbook 2008-02-13 16:20:45 UTC (rev 3895) +++ gfarm/branches/gfarm_v2/doc/docbook/ja/ref/man8/gfsd.8.docbook 2008-02-14 15:50:54 UTC (rev 3896) @@ -99,6 +99,13 @@ </varlistentry> <varlistentry> +<term><option>-h</option> <parameter>\xA5ۥ\xB9\xA5\xC8̾</parameter></term> +<listitem> +<para>\xBC\xAB\xA5ۥ\xB9\xA5ȤΥ\xAB\xA5Υ˥\xAB\xA5\xEB\xA4ʥۥ\xB9\xA5\xC8̾\xA4\xF2\xBB\xD8\xC4ꤷ\xA4ޤ\xB9\xA1\xA5</para> +</listitem> +</varlistentry> + +<varlistentry> <term><option>-l</option> <parameter>IP\xA5\xA2\xA5ɥ쥹</parameter></term> <listitem> <para>gfsd\xA4\xACTCP\xA4\xAA\xA4\xE8\xA4\xD3UDP\xA4\xCE\xCD\xE1\xA4\xF2\xBC\xF5\xA4\xB1\xC9դ\xB1\xA4\xEBIP\xA5\xA2\xA5ɥ쥹\xA4\xF2\xBB\xD8\xC4ꤷ\xA4ޤ\xB9\xA1\xA3 Modified: gfarm/branches/gfarm_v2/server/gfsd/gfsd.c =================================================================== --- gfarm/branches/gfarm_v2/server/gfsd/gfsd.c 2008-02-13 16:20:45 UTC (rev 3895) +++ gfarm/branches/gfarm_v2/server/gfsd/gfsd.c 2008-02-14 15:50:54 UTC (rev 3896) @@ -3312,7 +3312,7 @@ gfarm_error_t e, e2; char *config_file = NULL; char *listen_addrname = NULL, *pid_file = NULL; - char *canonical_self_name, *local_gfsd_user; + char *canonical_self_name = NULL, *local_gfsd_user; struct gfarm_host_info self_info; struct passwd *gfsd_pw; FILE *pid_fp = NULL; @@ -3330,7 +3330,7 @@ program_name = basename(argv[0]); gflog_set_identifier(program_name); - while ((ch = getopt(argc, argv, "L:P:dcf:l:r:s:uv")) != -1) { + while ((ch = getopt(argc, argv, "L:P:dcf:h:l:r:s:uv")) != -1) { switch (ch) { case 'L': syslog_level = gflog_syslog_name_to_priority(optarg); @@ -3352,6 +3352,9 @@ case 'f': config_file = optarg; break; + case 'h': + canonical_self_name = optarg; + break; case 'l': listen_addrname = optarg; break; @@ -3433,8 +3436,9 @@ exit(1); } gfarm_metadb_set_server(gfm_server); - e = gfarm_host_get_canonical_self_name(&canonical_self_name); - if (e != GFARM_ERR_NO_ERROR) { + if (canonical_self_name == NULL && + (e = gfarm_host_get_canonical_self_name(&canonical_self_name)) + != GFARM_ERR_NO_ERROR) { fprintf(stderr, "cannot get canonical hostname of this node (%s): %s\n", gfarm_host_get_self_name(), gfarm_error_string(e)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |