diff --git a/ChangeLog b/ChangeLog
index 7448bfe..bad4d0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-13 Paul Jakma <paul@dishone.st>
+
+	* added support for vtysh 'write file' command to 
+	write either per-daamon and/or integrated file
+
 2002-07-07  Kunihiro Ishiguro  <kunihiro@ipinfusion.com>
 
 	* zebra-0.93 released.
diff --git a/vtysh/ChangeLog b/vtysh/ChangeLog
index 5818d5c..701101a 100644
--- a/vtysh/ChangeLog
+++ b/vtysh/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-30 Paul Jakma <paulzebra@rs250.org>
+	
+	* vtysh.c: add 'write-config (integrated|daemon)' option
+	to specifiy whether write config commands should write
+	integrated Zebra.conf file and/or per daemon files.
+	Defaults to per daemon, unless this is turned off.
+
 2002-07-07  Kunihiro Ishiguro  <kunihiro@ipinfusion.com>
 
 	* zebra-0.93 released.
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 965eb39..6e12475 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -376,22 +376,22 @@
     {
     case CMD_WARNING:
       if (vty->type == VTY_FILE)
-	printf ("Warning...\n");
+	fprintf (stdout,"Warning...\n");
       break;
     case CMD_ERR_AMBIGUOUS:
-      printf ("%% Ambiguous command.\n");
+      fprintf (stdout,"%% Ambiguous command.\n");
       break;
     case CMD_ERR_NO_MATCH:
-      printf ("%% Unknown command.\n");
+      fprintf (stdout,"%% Unknown command.\n");
       break;
     case CMD_ERR_INCOMPLETE:
-      printf ("%% Command incomplete.\n");
+      fprintf (stdout,"%% Command incomplete.\n");
       break;
     case CMD_SUCCESS_DAEMON:
       {
 	if (pager && vtysh_pager_name)
 	  {
-	    fp = popen ("more", "w");
+	    fp = popen (vtysh_pager_name, "w");
 	    if (fp == NULL)
 	      {
 		perror ("popen");
@@ -558,16 +558,16 @@
 	{
 	case CMD_WARNING:
 	  if (vty->type == VTY_FILE)
-	    printf ("Warning...\n");
+	    fprintf (stdout,"Warning...\n");
 	  break;
 	case CMD_ERR_AMBIGUOUS:
-	  printf ("%% Ambiguous command.\n");
+	  fprintf (stdout,"%% Ambiguous command.\n");
 	  break;
 	case CMD_ERR_NO_MATCH:
-	  printf ("%% Unknown command: %s", vty->buf);
+	  fprintf (stdout,"%% Unknown command: %s", vty->buf);
 	  break;
 	case CMD_ERR_INCOMPLETE:
-	  printf ("%% Command incomplete.\n");
+	  fprintf (stdout,"%% Command incomplete.\n");
 	  break;
 	case CMD_SUCCESS_DAEMON:
 	  {
@@ -628,20 +628,20 @@
 
   describe = cmd_describe_command (vline, vty, &ret);
 
-  printf ("\n");
+  fprintf (stdout,"\n");
 
   /* Ambiguous and no match error. */
   switch (ret)
     {
     case CMD_ERR_AMBIGUOUS:
       cmd_free_strvec (vline);
-      printf ("%% Ambiguous command.\n");
+      fprintf (stdout,"%% Ambiguous command.\n");
       rl_on_new_line ();
       return 0;
       break;
     case CMD_ERR_NO_MATCH:
       cmd_free_strvec (vline);
-      printf ("%% There is no matched command.\n");
+      fprintf (stdout,"%% There is no matched command.\n");
       rl_on_new_line ();
       return 0;
       break;
@@ -672,10 +672,10 @@
 	  continue;
 
 	if (! desc->str)
-	  printf ("  %-s\n",
+	  fprintf (stdout,"  %-s\n",
 		  desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd);
 	else
-	  printf ("  %-*s  %s\n",
+	  fprintf (stdout,"  %-*s  %s\n",
 		  width,
 		  desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
 		  desc->str);
@@ -1175,7 +1175,7 @@
 
   if (vtysh_pager_name)
     {
-      fp = popen ("more", "w");
+      fp = popen (vtysh_pager_name, "w");
       if (fp == NULL)
 	{
 	  perror ("popen");
@@ -1214,11 +1214,42 @@
   return CMD_SUCCESS;
 }
 
-DEFUN (vtysh_write_memory,
-       vtysh_write_memory_cmd,
-       "write memory",
-       "Write running configuration to memory, network, or terminal\n"
-       "Write configuration to the file (same as write file)\n")
+struct vtysh_writeconfig_t {
+	int daemon;
+	int integrated;
+} vtysh_wc = {-1,0};
+
+DEFUN (vtysh_write_config,
+		vtysh_write_config_cmd,
+		"write-config (daemon|integrated)",
+		"Specify config files to write to\n"
+		"Write per daemon file\n"
+		"Write integrated file\n"
+)
+{
+	if (!strncmp(argv[0],"d",1)) {
+		vtysh_wc.daemon = 1;
+	} else if (!strncmp(argv[0],"i",1)) {
+		vtysh_wc.integrated = 1;
+	}
+	return CMD_SUCCESS;
+}
+
+DEFUN (no_vtysh_write_config,
+		no_vtysh_write_config_cmd,
+		"no write-config (daemon|integrated)",
+		"Negate per daemon and/or integrated config files\n"
+)
+{
+	if (!strncmp(argv[0],"d",1)) {
+		vtysh_wc.daemon = 0;
+	} else if (!strncmp(argv[0],"i",1)) {
+		vtysh_wc.integrated = 0;
+	}
+	return CMD_SUCCESS;
+}
+
+int write_config_integrated(void)
 {
   int ret;
   mode_t old_umask;
@@ -1235,22 +1266,19 @@
   strcat (integrate_sav, CONF_BACKUP_EXT);
 
 
-  printf ("Building Configuration...\n");
+  fprintf (stdout,"Building Configuration...\n");
 
   /* Move current configuration file to backup config file */
   unlink (integrate_sav);
   rename (integrate_default, integrate_sav);
-
+ 
   fp = fopen (integrate_default, "w");
   if (fp == NULL)
     {
-      printf ("%% Can't open configuration file %s.\n", integrate_default);
+      fprintf (stdout,"%% Can't open configuration file %s.\n", integrate_default);
       umask (old_umask);
       return CMD_SUCCESS;
     }
-  else
-    printf ("[OK]\n");
-	  
 
   vtysh_config_write (fp);
 
@@ -1265,10 +1293,46 @@
 
   fclose (fp);
 
+  fprintf(stdout,"Integrated configuration saved to %s\n",integrate_default);
+
+  fprintf (stdout,"[OK]\n");
+
   umask (old_umask);
   return CMD_SUCCESS;
 }
 
+DEFUN (vtysh_write_memory,
+       vtysh_write_memory_cmd,
+       "write memory",
+       "Write running configuration to memory, network, or terminal\n"
+       "Write configuration to the file (same as write file)\n")
+{
+  int ret;
+  char line[] = "write memory\n";
+  
+  /* if integrated Zebra.conf explicitely set */
+  if (vtysh_wc.integrated == 1) {
+  	ret = write_config_integrated();
+  }
+
+  if (!vtysh_wc.daemon) {
+  	return ret;
+  }
+
+  fprintf (stdout,"Building Configuration...\n");
+	  
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_ZEBRA], line, stdout);
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_RIP], line, stdout);
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_RIPNG], line, stdout);
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_OSPF], line, stdout);
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_OSPF6], line, stdout);
+  ret = vtysh_client_execute (&vtysh_client[VTYSH_INDEX_BGP], line, stdout);
+
+  fprintf (stdout,"[OK]\n");
+
+  return CMD_SUCCESS;  
+}
+
 ALIAS (vtysh_write_memory,
        vtysh_copy_runningconfig_startupconfig_cmd,
        "copy running-config startup-config",  
@@ -1800,4 +1864,6 @@
   install_element (CONFIG_NODE, &no_vtysh_log_trap_cmd);
   install_element (CONFIG_NODE, &vtysh_log_record_priority_cmd);
   install_element (CONFIG_NODE, &no_vtysh_log_record_priority_cmd);
+  install_element (CONFIG_NODE, &vtysh_write_config_cmd);
+  install_element (CONFIG_NODE, &no_vtysh_write_config_cmd);
 }
