Commit 2d941e27 authored by Leigh Stoller's avatar Leigh Stoller

Merge branch 'localize_mfs_upd' into 'master'

add localize_mfs "-I" flag that adds an /etc/issue msg to MFS

See merge request !49
parents 86276af0 a7143f3b
......@@ -31,7 +31,7 @@ use Data::Dumper;
#
sub usage()
{
print("Usage: localize_mfs [-d] [-c console] [-F version] <path>\n");
print("Usage: localize_mfs [-d] [-c console] [-F version] [-I msg] <path>\n");
print(" -d Turn on debugging.\n");
print(" -c console Set the MFS console device to one of:\n");
print(" 'vga', 'sio', 'sio2', 'sio3', 'sio4', 'null'\n");
......@@ -39,9 +39,10 @@ sub usage()
print(" -F version Set kernel version used in a FreeBSD MFS:\n");
print(" One of: '8', '9', '10', or '11'\n");
print(" Only applies to FreeBSD MFSes (duh!)\n");
print(" -I msg Identification msg to put in /etc/issue\n");
exit(-1);
}
my $optlist = "dc:F:i";
my $optlist = "dc:F:iI:";
my $debug = 0;
my $igbcruft= 0;
......@@ -488,6 +489,15 @@ sub LocalizeBSD()
" \"/tftpboot/pxeboot.emu-$cstr\".\n";
}
#
# update /etc/issue if requested
#
if (defined($options{'I'})) {
open(ISSUE, ">$mpoint/etc/issue") or goto bad;
printf ISSUE "%s\n", $options{'I'} or goto bad;
close(ISSUE) or goto bad;
}
#
# Mark as "localized". This tells slicefix that it should copy all
# the above stuff into the image.
......@@ -607,6 +617,15 @@ sub LocalizeLinux($)
UpdateSSHD($mpoint, "/etc/testbed/slicefix")
or goto bad;
#
# update /etc/issue if requested
#
if (defined($options{'I'})) {
open(ISSUE, ">etc/issue") or goto bad;
printf ISSUE "%s\n", $options{'I'} or goto bad;
close(ISSUE) or goto bad;
}
#
# Mark as "localized". This tells slicefix that it should copy all
# the above stuff into the image.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment