Diff for /embedaddon/quagga/zebra/main.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 17:26:11 version 1.1.1.2, 2012/10/09 09:22:29
Line 71  struct option longopts[] =  Line 71  struct option longopts[] = 
   { "keep_kernel", no_argument,       NULL, 'k'},    { "keep_kernel", no_argument,       NULL, 'k'},
   { "config_file", required_argument, NULL, 'f'},    { "config_file", required_argument, NULL, 'f'},
   { "pid_file",    required_argument, NULL, 'i'},    { "pid_file",    required_argument, NULL, 'i'},
     { "socket",      required_argument, NULL, 'z'},
   { "help",        no_argument,       NULL, 'h'},    { "help",        no_argument,       NULL, 'h'},
   { "vty_addr",    required_argument, NULL, 'A'},    { "vty_addr",    required_argument, NULL, 'A'},
   { "vty_port",    required_argument, NULL, 'P'},    { "vty_port",    required_argument, NULL, 'P'},
Line 128  usage (char *progname, int status) Line 129  usage (char *progname, int status)
               "-d, --daemon       Runs in daemon mode\n"\                "-d, --daemon       Runs in daemon mode\n"\
               "-f, --config_file  Set configuration file name\n"\                "-f, --config_file  Set configuration file name\n"\
               "-i, --pid_file     Set process identifier file name\n"\                "-i, --pid_file     Set process identifier file name\n"\
                 "-z, --socket       Set path of zebra socket\n"\
               "-k, --keep_kernel  Don't delete old routes which installed by "\                "-k, --keep_kernel  Don't delete old routes which installed by "\
                                   "zebra.\n"\                                    "zebra.\n"\
               "-C, --dryrun       Check configuration for validity and exit\n"\                "-C, --dryrun       Check configuration for validity and exit\n"\
Line 214  main (int argc, char **argv) Line 216  main (int argc, char **argv)
   char *config_file = NULL;    char *config_file = NULL;
   char *progname;    char *progname;
   struct thread thread;    struct thread thread;
     char *zserv_path = NULL;
   
   /* Set umask before anything for security */    /* Set umask before anything for security */
   umask (0027);    umask (0027);
Line 229  main (int argc, char **argv) Line 232  main (int argc, char **argv)
       int opt;        int opt;
       
 #ifdef HAVE_NETLINK    #ifdef HAVE_NETLINK  
      opt = getopt_long (argc, argv, "bdkf:i:hA:P:ru:g:vs:C", longopts, 0);      opt = getopt_long (argc, argv, "bdkf:i:z:hA:P:ru:g:vs:C", longopts, 0);
 #else  #else
      opt = getopt_long (argc, argv, "bdkf:i:hA:P:ru:g:vC", longopts, 0);      opt = getopt_long (argc, argv, "bdkf:i:z:hA:P:ru:g:vC", longopts, 0);
 #endif /* HAVE_NETLINK */  #endif /* HAVE_NETLINK */
   
       if (opt == EOF)        if (opt == EOF)
Line 261  main (int argc, char **argv) Line 264  main (int argc, char **argv)
         case 'i':          case 'i':
           pid_file = optarg;            pid_file = optarg;
           break;            break;
           case 'z':
             zserv_path = optarg;
             break;
         case 'P':          case 'P':
           /* Deal with atoi() returning 0 on failure, and zebra not            /* Deal with atoi() returning 0 on failure, and zebra not
              listening on zebra port... */               listening on zebra port... */
Line 386  main (int argc, char **argv) Line 392  main (int argc, char **argv)
   pid = getpid ();    pid = getpid ();
   
   /* This must be done only after locking pidfile (bug #403). */    /* This must be done only after locking pidfile (bug #403). */
  zebra_zserv_socket_init ();  zebra_zserv_socket_init (zserv_path);
   
   /* Make vty server socket. */    /* Make vty server socket. */
   vty_serv_sock (vty_addr, vty_port, ZEBRA_VTYSH_PATH);    vty_serv_sock (vty_addr, vty_port, ZEBRA_VTYSH_PATH);

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>