]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd: remove reload-by-reexec
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 8 Mar 2017 15:03:35 +0000 (16:03 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 8 Mar 2017 15:04:56 +0000 (16:04 +0100)
This is a quite horrible mechanism...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
isisd/isis_main.c

index a6ad424ace7026cb0caed523320246ceaca1a45b..644b652d44c2e3e8228ad1877906f4b77f875fda 100644 (file)
@@ -89,35 +89,15 @@ struct option longopts[] = {
 /* Master of threads. */
 struct thread_master *master;
 
-/* for reload */
-char _cwd[MAXPATHLEN];
-char _progpath[MAXPATHLEN];
-int _argc;
-char **_argv;
-char **_envp;
-
 /*
  * Prototypes.
  */
-void reload(void);
 void sighup(void);
 void sigint(void);
 void sigterm(void);
 void sigusr1(void);
 
 
-void
-reload ()
-{
-  zlog_debug ("Reload");
-  /* FIXME: Clean up func call here */
-  vty_reset ();
-  (void) isisd_privs.change (ZPRIVS_RAISE);
-  execve (_progpath, _argv, _envp);
-  zlog_err ("Reload failed: cannot exec %s: %s", _progpath,
-      safe_strerror (errno));
-}
-
 static __attribute__((__noreturn__)) void
 terminate (int i)
 {
@@ -131,9 +111,7 @@ terminate (int i)
 void
 sighup (void)
 {
-  zlog_debug ("SIGHUP received");
-  reload ();
-
+  zlog_err ("SIGHUP/reload is not implemented for isisd");
   return;
 }
 
@@ -199,21 +177,6 @@ main (int argc, char **argv, char **envp)
 {
   int opt;
 
-  /* for reload */
-  _argc = argc;
-  _argv = argv;
-  _envp = envp;
-  if (getcwd (_cwd, sizeof (_cwd)) == NULL)
-    {
-      zlog_err ("ISISd: Unable to determine CWD: %d", errno);
-      exit (1);
-    }
-
-  if (*argv[0] == '.')
-    snprintf (_progpath, sizeof (_progpath), "%s/%s", _cwd, _argv[0]);
-  else
-    snprintf (_progpath, sizeof (_progpath), "%s", argv[0]);
-
   frr_preinit (&isisd_di, argc, argv);
   frr_opt_add ("", longopts, "");