Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/distrib/utils/sysinst/arch/i386 Pull up rev. 1.37 to ne...



details:   https://anonhg.NetBSD.org/src/rev/7af37e3374a0
branches:  netbsd-1-5
changeset: 489494:7af37e3374a0
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed Sep 20 20:14:06 2000 +0000

description:
Pull up rev. 1.37 to netbsd-1-5 branch, OK'd by thorpej:
 >  * Fix changing of /etc/rc.conf after the main file moved recently.
 >    'rc_configured' is still changed via sed's s///, wscons=yes is appended
 >    via "echo >>".

This was tested in a full install based on 1.5 sources.

diffstat:

 distrib/utils/sysinst/arch/i386/md.c |  31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diffs (60 lines):

diff -r 43b87f1ae33d -r 7af37e3374a0 distrib/utils/sysinst/arch/i386/md.c
--- a/distrib/utils/sysinst/arch/i386/md.c      Wed Sep 20 20:13:14 2000 +0000
+++ b/distrib/utils/sysinst/arch/i386/md.c      Wed Sep 20 20:14:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.36 2000/05/12 01:00:08 hubertf Exp $ */
+/*     $NetBSD: md.c,v 1.36.4.1 2000/09/20 20:14:06 hubertf Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -469,31 +469,40 @@
 {
        char realfrom[STRSIZE];
        char realto[STRSIZE];
-       char sedcmd[STRSIZE];
+       char cmd[STRSIZE];
 
        strncpy(realfrom, target_expand("/etc/rc.conf"), STRSIZE);
        strncpy(realto, target_expand("/etc/rc.conf.install"), STRSIZE);
-       sprintf(sedcmd, "sed "
+       sprintf(cmd, "sed "
                        "-e 's/rc_configured=NO/rc_configured=YES/' "
-                       "-e 's/wscons=NO/wscons=YES/' "
                        " < %s > %s", realfrom, realto);
        if (logging)
-               (void)fprintf(log, "%s\n", sedcmd);
+               (void)fprintf(log, "%s\n", cmd);
        if (scripting)
-               (void)fprintf(script, "%s\n", sedcmd);
-       do_system(sedcmd);
+               (void)fprintf(script, "%s\n", cmd);
+       do_system(cmd);
+
+       /* put "wscons=YES" into rc.conf.install (which will be renamed
+        * to rc.conf in a second) */
+       sprintf(cmd, "echo wscons=YES >> %s", realto);
+       if (logging)
+               (void)fprintf(log, "%s\n", cmd);
+       if (scripting)
+               (void)fprintf(script, "%s\n", cmd);
+       do_system(cmd);
+
        run_prog(1, 0, NULL, "mv -f %s %s", realto, realfrom);
 
        strncpy(realfrom, target_expand("/etc/ttys"), STRSIZE);
        strncpy(realto, target_expand("/etc/ttys.install"), STRSIZE);
-       sprintf(sedcmd, "sed "
+       sprintf(cmd, "sed "
                        "-e '/^ttyE/s/off/on/'"
                        " < %s > %s", realfrom, realto);
        if (logging)
-               (void)fprintf(log, "%s\n", sedcmd);
+               (void)fprintf(log, "%s\n", cmd);
        if (scripting)
-               (void)fprintf(script, "%s\n", sedcmd);
-       do_system(sedcmd);
+               (void)fprintf(script, "%s\n", cmd);
+       do_system(cmd);
        run_prog(1, 0, NULL, "mv -f %s %s", realto, realfrom);
 
        run_prog(0, 0, NULL, "rm -f %s", target_expand("/sysinst"));



Home | Main Index | Thread Index | Old Index