Commit a5fa1072 authored by Mike Hibler's avatar Mike Hibler

For Linux MFS, put .localized in /root instead of /.

Sigh...for whatever reason, the unpacking of the MFS cpio archive
doesn't pick up /.localized (probably because it is doing something
akin to "cpio /*") so we put it in /root instead. Actually we put it
in both places for compat.
parent 8a0c87bc
......@@ -365,11 +365,12 @@ fi
# Indicates the MFS has been properly localized and we can copy stuff
# into the image.
LOCALIZED="/.localized"
LOCALIZED1="/.localized"
LOCALIZED2="/root/.localized"
islocalized()
{
if [ -e $LOCALIZED ]; then
if [ -e $LOCALIZED1 -o -e $LOCALIZED2 ]; then
return 0;
fi
return 1;
......
......@@ -13,7 +13,8 @@ my $MKSWAP = '/sbin/mkswap';
my $UUIDGEN = 'uuidgen';
my $LOSETUP = 'losetup';
my $TUNE2FS = 'tune2fs';
my $LOCALIZED = '/.localized';
my $LOCALIZED1 = '/.localized';
my $LOCALIZED2 = '/root/.localized';
use constant GZHDR1 => 0x1f8b0800;
use constant GZHDR2 => 0x1f8b0808;
......@@ -802,7 +803,7 @@ sub localize
{
my ($imageroot) = @_;
if (! -e "$LOCALIZED") {
if (! -e "$LOCALIZED1" && ! -e "$LOCALIZED2") {
return;
}
......
......@@ -130,10 +130,11 @@ fi
# Indicates the MFS has been properly localized and we can copy stuff
# into the image.
LOCALIZED="/.localized"
LOCALIZED1="/.localized"
LOCALIZED2="/root/.localized"
islocalized() {
if [ -e $LOCALIZED ]; then
if [ -e $LOCALIZED1 -o -e $LOCALIZED2 ]; then
return 0;
fi
return 1;
......
......@@ -297,7 +297,7 @@ sub LocalizeBSD()
}
#
# Localize a Lnux MFS
# Localize a Linux MFS
#
sub LocalizeLinux($)
{
......@@ -382,8 +382,14 @@ sub LocalizeLinux($)
# Mark as "localized". This tells slicefix that it should copy all
# the above stuff into the image.
#
# XXX argh, it appears that the cpio unpacking of the MFS at boot
# time doesn't get /.localized and I don't want to figure out why.
# So we stash the file in /root/.localized as well.
#
ExecQuiet("$CP /dev/null .localized")
== 0 or goto bad;
ExecQuiet("$CP /dev/null root/.localized")
== 0 or goto bad;
#
# Compress it back.
......
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