From c4d0be1474a373099a95e66a6a118ec337e449e4 Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 18 Dec 2001 20:27:46 +0000 Subject: [PATCH] passes filesystem command, and makes sure helper is 0666 .. cvs changed the perms. --- Makefile | 5 ++++- expect_uml | 50 ++++++++++++++++++++++++++------------------------ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index cb2e6bf..cf5b84f 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/expect_uml b/expect_uml index 44ae314..6557d8d 100755 --- a/expect_uml +++ b/expect_uml @@ -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 $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(); +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" + ); + +$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();