svn commit: r222848 - head/usr.sbin/rtsold
Hiroki Sato
hrs at FreeBSD.org
Wed Jun 8 04:06:56 UTC 2011
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);
More information about the svn-src-all
mailing list