1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-02-24 09:23:23 -05:00

passes filesystem command, and makes sure helper is 0666 .. cvs changed

the perms.
This commit is contained in:
freesource 2001-12-18 20:27:46 +00:00
parent b6781d4027
commit c4d0be1474
2 changed files with 27 additions and 22 deletions

View File

@ -8,6 +8,9 @@ install:
cp -fa yard_chrooted_tests /usr/lib/bootroot/yard_chrooted_tests
cp -fa genext2fs/genext2fs /usr/lib/bootroot/genext2fs
cp -fa expect_uml /usr/lib/bootroot/expect_uml
install -d /usr/lib/bootroot/root_filesystem
chmod 06666 root_filesystem/root_fs_helper
cp -fa root_filesystem/root_fs_helper /usr/lib/bootroot/root_filesystem
cp -fa yard/scripts/make_debian /usr/bin/make_debian
install -d /usr/share/perl5/BootRoot
cp -fa BootRoot/*.pm /usr/share/perl5/BootRoot
@ -17,7 +20,7 @@ install:
cp -fa user-mode-linux/usr/lib/uml/modules* /usr/lib/bootroot/yard/Replacements/lib/modules
cp -fa user-mode-linux/usr/lib/uml/CVS /usr/lib/bootroot/yard/Replacements/lib/modules/CVS
install -d /usr/share/gbootroot/yard/templates
chmod 444 yard/templates/*.yard
chmod 0444 yard/templates/*.yard
cp -fa yard/templates/Example* /usr/share/gbootroot/yard/templates
install -d /usr/share/gbootroot/genext2fs
cp -fa genext2fs/genext2fs.c /usr/share/gbootroot/genext2fs

View File

@ -3,34 +3,36 @@
use BootRoot::UML;
if ( !$ARGV[0] ) {
die "expect_uml host-systems-kernel-version ubd0 ubd1 other-options mount-point\n";
die "expect_uml ubd0 ubd1 other-options mount-point filesystem_command\n";
}
my $arguments = "$ARGV[1] $ARGV[2] $ARGV[3]";
my $mount_point = "$ARGV[4]";
my $arguments = "$ARGV[0] $ARGV[1] $ARGV[2]";
my $mount_point = "$ARGV[3]";
my $filesystem = "$ARGV[4];
my $uml =
BootRoot::UML->new( login_prompt => "bootroot login: ",
arguments => $arguments,
login => "root",
password_prompt => "Password: ",
password => "",
prompt => "bootroot:.*# ",
halt => "shutdown -h now"
);
my $uml =
BootRoot::UML->new( login_prompt => "bootroot login: ",
arguments => $arguments,
login => "root",
password_prompt => "Password: ",
password => "",
prompt => "bootroot:.*# ",
halt => "shutdown -h now"
);
$uml->boot();
$uml->command("mke2fs -m0 /dev/ubd/1");
$uml->command("mount /dev/ubd/1 /mnt1");
$uml->command("mount -t hostfs none -o $mount_point /mnt2");
$uml->command("cp -a /mnt2/* /mnt1");
$uml->command("chown -R 0:0 /mnt1");
$uml->command("umount /mnt1; umount /mnt2");
$uml->halt();
$uml->boot();
# Make the GID/UID 0 FS
$uml->command("$filesystem /dev/ubd/1");
$uml->command("mount /dev/ubd/1 /mnt1");
$uml->command("mount -t hostfs none -o $mount_point /mnt2");
$uml->command("cp -a /mnt2/* /mnt1");
$uml->command("chown -R 0:0 /mnt1");
$uml->command("umount /mnt1; umount /mnt2");
$uml->halt();