diff options
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 13 | ||||
| -rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 16 | 
2 files changed, 21 insertions, 8 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 3a0c30f98c7..af931a93938 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -1113,7 +1113,7 @@ main (int argc, char *argv[])  		argp_help (&argp, stderr, ARGP_HELP_SEE, (char *) argv[0]);  		return -1;  	} -	_gf_dump_details (argc, argv); +  	if ((graph = _parse_specfp (ctx, specfp)) == NULL) {  		/* _parse_specfp() prints necessary error message */  		fprintf (stderr, "exiting\n"); @@ -1167,13 +1167,22 @@ main (int argc, char *argv[])  		}  		/* we are daemon now */ +                _gf_dump_details (argc, argv); +   		/* update pid file, if given */   		if (cmd_args->pid_file != NULL) {   			fprintf (ctx->pidfp, "%d\n", getpid ());   			fflush (ctx->pidfp);   			/* we close pid file on exit */   		} -	} +	} else { +                /* +                 * Need to have this line twice because PID is different +                 * in daemon and non-daemon cases. +                 */ + +                _gf_dump_details (argc, argv); +        }  	gf_log ("glusterfs", GF_LOG_DEBUG,   		"running in pid %d", getpid ()); diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 4d6e602b0ff..2b43f834b8d 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -18,7 +18,7 @@ -_init () +function _init ()  {      # log level definitions      LOG_NONE=NONE; @@ -27,12 +27,13 @@ _init ()      LOG_WARNING=WARNING;      LOG_NORMAL=NORMAL      LOG_DEBUG=DEBUG; +    LOG_TRACE=TRACE; -    # set default log level to ERROR +    # set default log level to NORMAL      log_level=$LOG_NORMAL;  } -start_glusterfs () +function start_glusterfs ()  {      prefix="@prefix@";      exec_prefix=@exec_prefix@; @@ -55,6 +56,9 @@ start_glusterfs ()  	    "WARNING")  		log_level=$LOG_WARNING;  		;; +	    "TRACE") +		log_level=$LOG_TRACE; +		;;  	    "NONE")  		log_level=$LOG_NONE;  		;; @@ -106,7 +110,7 @@ start_glusterfs ()  } -main () +function main ()  {      options=$(echo "$@" | sed -n 's/.*\-o[ ]*\([^ ]*\).*/\1/p');      new_log_level=$(echo "$options" | sed -n 's/.*log-level=\([^,]*\).*/\1/p'); @@ -150,11 +154,11 @@ main ()      mount_point="$2";      # Simple check to avoid multiple identical mounts -    if grep -q " $mount_point fuse.glusterfs " /etc/mtab; then +    if grep -q "glusterfs.* $mount_point fuse" /etc/mtab; then          echo "$0: according to mtab, GlusterFS is already mounted on $mount_point"          exit 1      fi -     +      fs_options=$(echo "$fs_options,$new_fs_options");      start_glusterfs;  | 
