- Disable "resolvconf -d" temporarily to avoid extra invocations of the script

under a certain condition.
- Fix argv handling.

Spotted by:	ume
This commit is contained in:
Hiroki Sato 2011-06-08 04:06:56 +00:00
parent ffe8cd7b10
commit b4da9fbccd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222848
2 changed files with 7 additions and 2 deletions

View File

@ -625,8 +625,10 @@ ra_opt_handler(struct ifinfo *ifi)
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. */

View File

@ -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);