make the eula acceptance permanent by adding it to sysctl.conf. From Anon Ymous
This commit is contained in:
parent
33dafe234f
commit
5f123c574b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: defs.h,v 1.136 2008/08/08 02:54:06 simonb Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.137 2008/11/06 15:30:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -411,6 +411,7 @@ int set_root_shell(void);
|
|||
void scripting_fprintf(FILE *, const char *, ...);
|
||||
void scripting_vfprintf(FILE *, const char *, va_list);
|
||||
void add_rc_conf(const char *, ...);
|
||||
void add_sysctl_conf(const char *, ...);
|
||||
void enable_rc_conf(void);
|
||||
int check_partitions(void);
|
||||
void set_sizemultname_cyl(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: net.c,v 1.118 2008/11/05 22:58:37 christos Exp $ */
|
||||
/* $NetBSD: net.c,v 1.119 2008/11/06 15:30:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -508,6 +508,7 @@ handle_license(const char *dev)
|
|||
if (sysctlbyname(buf, NULL, NULL, &val,
|
||||
0) == -1)
|
||||
return 0;
|
||||
add_sysctl_conf("%s=1", buf);
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.151 2008/02/04 01:54:56 riz Exp $ */
|
||||
/* $NetBSD: util.c,v 1.152 2008/11/06 15:30:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -1261,6 +1261,24 @@ add_rc_conf(const char *fmt, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
add_sysctl_conf(const char *fmt, ...)
|
||||
{
|
||||
FILE *f;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
f = target_fopen("/etc/sysctl.conf", "a");
|
||||
if (f != 0) {
|
||||
scripting_fprintf(NULL, "cat <<EOF >>%s/etc/sysctl.conf\n",
|
||||
target_prefix());
|
||||
scripting_vfprintf(f, fmt, ap);
|
||||
fclose(f);
|
||||
scripting_fprintf(NULL, "EOF\n");
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
enable_rc_conf(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue