version 1.1, 2003/10/13 09:37:45 |
version 1.2, 2003/10/15 19:43:00 |
|
|
# POSSIBILITY OF SUCH DAMAGE. |
# POSSIBILITY OF SUCH DAMAGE. |
# |
# |
|
|
|
# Script to generate platform MAKEDEV script from MI template, MD |
|
# MAKEDEV.conf and MD/MI major lists |
|
# |
|
# Uses environment variables MACHINE/MACHINE_ARCH to select |
|
# appropriate files, and NETBSDSRCDIR to get root of source tree. |
|
|
BEGIN { |
BEGIN { |
# top of source tree, used to find major number list in kernel |
# top of source tree, used to find major number list in kernel |
# sources |
# sources |
|
|
} |
} |
} |
} |
|
|
|
# read MD config file, and determine disk partitions |
|
# and MD device list |
|
cfgfile = "etc." machine "/MAKEDEV.conf" |
|
MDDEV = 0 # MD device targets |
|
MKDISK = "" # routine to create disk devices |
|
while (getline < cfgfile) { |
|
if ($1 ~ "^DISKPARTITIONS=") { |
|
sub(".*=[ \t]*", "") |
|
MKDISK = "makedisk_p" $0 |
|
} else if (MDDEV) { |
|
if (MDDEV == 1) |
|
MDDEV = $0 |
|
else |
|
MDDEV = MDDEV "\n" $0 |
|
} else if ($1 ~ "^MD_DEVICES=") |
|
MDDEV = 1 |
|
} |
|
|
# initially no substitutions |
# initially no substitutions |
devsubst = 0 |
devsubst = 0 |
deventry = "" |
deventry = "" |
|
|
} |
} |
|
|
{ |
{ |
|
sub("^%MD_DEVICES%", MDDEV) |
|
sub("%MKDISK%", MKDISK) |
|
|
# if device substitutions are not active, do nothing more |
# if device substitutions are not active, do nothing more |
if (!devsubst) { |
if (!devsubst) { |
print |
print |