Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 1997 15:39:36 -0600 (MDT)
From:      Brandon Gillespie <brandon@roguetrader.com>
To:        freebsd-current@freeBSD.org
Subject:   new command: doconfig
Message-ID:  <Pine.BSF.3.96.971001151916.28417A-200000@roguetrader.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
I would like to add this as a new command to FreeBSD.  I mentioned it a
few months back when I originally wrote it, and received positive
responses about it.  This command derives from a similar command in
Digital Unix.  'doconfig' is basically a simplifier for kernel compiling,
by wrapping 'vi /sys/i386/conf/MINE; config; cd ../../compile/MINE; make
depend; make; make install; reboot' or whatnot into a simpler, nicer
interface.. For instance, I just recompiled my kernel with (the GLACIER
config file already existed): 

----------------------------------------------------------------
    % doconfig -r -c GLACIER
Remove existing kernel log /sys/i386/conf/kernelbuild.log? [yes] y
Removing old directory ../../compile/GLACIER:  Done.
Kernel build directory is ../../compile/GLACIER
Building Dependancies..  1-Oct-1997 15:20.49
Building Dependancies..  1-Oct-1997 15:21.57
Building Kernel..  1-Oct-1997 15:21.57
Building Kernel..  1-Oct-1997 15:32.38
Installing Kernel..  1-Oct-1997 15:32.38
A backup kernel already exists, rename to /kernel.29-Jul-1997? [yes] yes
*** 
*** Ready to reboot.  If the system is unable to bootup, you can type:
*** 
***     /kernel.old
*** 
*** At the 'Boot:' prompt, to boot from the old kernel.
***

[Press ENTER to Reboot]
----------------------------------------------------------------

This program is a PERL program, and has a few places where I would like to
expand it in the future (for instance, I've heard rumors about a
auto-kernel-config-file-generation program, so for now I just run a few
seds and whatnot on the GENERIC template, when generating a new config
file--this could instead hook into the auto-generation one).

I would like to add:

    /usr/sbin/doconfig
    /usr/share/man/man8/doconfig.8.gz

Comments, questions?  The manpage is attached.

-Brandon Gillespie

[-- Attachment #2 --]

DOCONFIG(8)             FreeBSD System Manager's Manual            DOCONFIG(8)

NAME
     doconfig - interactively configure and build kernel

SYNOPSIS
     doconfig [-c file] [-e [editor]] [-air] [-gpn]

DESCRIPTION
     Doconfig is used to build and install a new kernel for the system.  It
     interactively generates the kernel config files (using config(8)).  com-
     piles the kernel and optionaly installs and reboots the system when fin-
     ished.

     Available options:

     -c file      Use file as the configuration file. If the full path is giv-
                  en in file, doconfig will copy it to /sys/i386/conf. Other-
                  wise, it will assume the file exists in /sys/i386/conf. If
                  this option is used, doconfig will not run an editor on the
                  config file, unless the -e option is also specified.

     -e [editor]  Edit the config file (this is the defualt action, unless -c
                  was specified).  If editor is specified use it as the editor
                  instead (full path may be required).  If editor is not spec-
                  ified doconfig will use the EDITOR environment variable, or
                  /usr/bin/vi.

     -a           Ignored by doconfig and passed to autokernconf if the kernel
                  configuration file is automatically generated.  If speci-
                  fied, it will direct autokernconf to just automatically se-
                  lect defaults, rather than interactively deciding all set-
                  tings for the configuration file.

     -i           Install the kernel into the root directory after a success-
                  ful compile.  If /kernel exists, move it to /kernel.DATE.

     -r           Reboot after successfully building and installing.  This op-
                  tion also installs the kernel (as -i normally would)--user
                  will be prompted before the reboot occurs.

     -g -p -n     Ignored by doconfig and passed to config.

     Doconfig can be run from any location on the filesystem, as it will in-
     ternally manage file locations and working directories.  Doconfig will
     prompt the user for the kernel build name which is sent to config, with
     it defaulting to the current hostname.

     If the kernel configuration file is not specified with -c then the pro-
     gram autokernconf is executed to create it.

FILES
     /sys/i386/conf/kernelbuild.log  Logfile of kernel compile.
     /sys/i386/conf/FILE             Config file generated for config.
     /kernel                         System Kernel.
     /kernel.DATE                    Backup of old system Kernel.

SEE ALSO
     config(8),  autokernconf(8)

HISTORY
     Created for FreeBSD 2.2, based off the Digital Unix doconfig.

 FreeBSD                        April 16, 1997                               1

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971001151916.28417A-200000>