cfgaply
Purpose
Applies configuration information.
Library
Run-time Services Library (librts.a)
Syntax
#include <cfg03.h>
int cfgaply (restart)
int restart;
Description
The cfgaply subroutine rebuilds the AIX kernel. It runs
the make command to allow you to rebuild the following
files:
o /usr/sys/cf/conf.c
o /usr/sys/cf/conf.o
o /usr/sys/specials
o Kernel library files:
/usr/sys/lib0
/usr/sys/lib1
/usr/sys/lib2
The restart parameter indicates whether to restart the
system after the subroutine completes. If restart is a
nonzero value, then the system is restarted after com-
pletion.
Before attempting to rebuild the kernel, cfgaply creates
a backup copy of it named /unixdate.seq, where date is
the Julian date the backup was created, and seq is a
sequence number, starting with 1. Since kernel images
take up storage space, cfgaply deletes any backup copies
that were saved previously.
The cfgaply subroutine creates a shell procedure named
/usr/sys/specials that contains the mknod, chown, and
chmod commands necessary to create the special files
(/dev files) needed by the new kernel. The cfgaply sub-
routine does not run this shell procedure.
Return Value
If the restart parameter is nonzero, then the system is
restarted and the cfgaply subroutine does not return. If
restart is 0 and cfgaply completes successfully, then it
returns the value CFG_SUCC. If an AIX program fails that
cfgaply has executed, the return code from that program
is returned. If the cfgaply subroutine itself fails,
then one of the following values is returned:
CFG_ACCS A failure occurred while accessing the /unix
kernel.
CFG_AOPN The open system call failed.
CFG_ABCK A failure occurred while reading the kernel
and writing to the backup file.
CFG_ACPF A failure occurred while reading the rebuilt
kernel (/usr/sys/unix.std) and copying it to
/unix on the root file system. The previous
/unix kernel remains intact.
CFG_AMKF The make command failed. Error messages from
make are redirected to the file
/usr/sys/make.out.
Files
/unix
/unixdate.seq
/usr/sys/cf/conf.c
/usr/sys/cf/conf.o
/usr/sys/specials
/usr/sys/lib0
/usr/sys/lib1
/usr/sys/lib2
/usr/sys/make.out
/usr/sys/unix.std
Related Information
In this book: "config."
The config and make commands in AIX Operating System Com-
mands Reference.