Date: Wed, 8 Jun 2011 04:06:56 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222848 - head/usr.sbin/rtsold Message-ID: <201106080406.p5846uVP013724@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Wed Jun 8 04:06:56 2011 New Revision: 222848 URL: http://svn.freebsd.org/changeset/base/222848 Log: - Disable "resolvconf -d" temporarily to avoid extra invocations of the script under a certain condition. - Fix argv handling. Spotted by: ume Modified: head/usr.sbin/rtsold/rtsol.c head/usr.sbin/rtsold/rtsold.c Modified: head/usr.sbin/rtsold/rtsol.c ============================================================================== --- head/usr.sbin/rtsold/rtsol.c Wed Jun 8 03:55:58 2011 (r222847) +++ head/usr.sbin/rtsold/rtsol.c Wed Jun 8 04:06:56 2011 (r222848) @@ -625,8 +625,10 @@ free1: if (!TAILQ_EMPTY(&sm_rdnss_head)) CALL_SCRIPT(RESADD, &sm_rdnss_head); +#if 0 else CALL_SCRIPT(RESDEL, NULL); +#endif ra_opt_handler_freeit: /* Clear script message queue. */ Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Wed Jun 8 03:55:58 2011 (r222847) +++ head/usr.sbin/rtsold/rtsold.c Wed Jun 8 04:06:56 2011 (r222848) @@ -124,6 +124,7 @@ main(int argc, char **argv) int maxfd; #endif int rtsock; + char *argv0; #ifndef SMALL /* rtsold */ @@ -134,6 +135,8 @@ main(int argc, char **argv) fflag = 1; once = 1; #endif + argv0 = argv[0]; + while ((ch = getopt(argc, argv, opts)) != -1) { switch (ch) { case 'a': @@ -185,9 +188,9 @@ main(int argc, char **argv) if (!fflag) { char *ident; - ident = strrchr(argv[0], '/'); + ident = strrchr(argv0, '/'); if (!ident) - ident = argv[0]; + ident = argv0; else ident++; openlog(ident, LOG_NDELAY|LOG_PID, LOG_DAEMON);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106080406.p5846uVP013724>