From 6aa8a42f3aae07a7dcff1c480d2467b45e1cde0e Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 20 Feb 2003 07:34:27 +0000 Subject: [PATCH] Had to add more changes to expect_uml and UML so that there will be an established PATH, and so that uml_mconsole's system command won't be issued until the last line is actually come to via a new method. Nothing can ever be too simple. --- BootRoot/UML.pm | 2 +- expect_uml | 9 +++++++-- yard/templates/Helper.yard | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/BootRoot/UML.pm b/BootRoot/UML.pm index 182f775..eb3f9ad 100644 --- a/BootRoot/UML.pm +++ b/BootRoot/UML.pm @@ -183,7 +183,7 @@ sub halt { sub close_no_init { my $me = shift; - $me->{expect_handle}->print("Shutting down\s\s\n"); + $me->{expect_handle}->print("Shutting down \n"); $me->{expect_handle}->expect(undef, "-re", "Shutting down"); } diff --git a/expect_uml b/expect_uml index 2b6de27..d31a38b 100755 --- a/expect_uml +++ b/expect_uml @@ -91,7 +91,7 @@ my $uml = login => "root", password_prompt => "Password: ", password => "", - prompt => ".*# ", + prompt => "init-.*# ", halt => "exit" ); @@ -100,7 +100,12 @@ $uml->boot(); # Establish PATH, some compilations of bash ignore some important paths $uml->command("PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:."); -$uml->command("mount -t proc proc /proc"); +# Sometimes this is required + +$uml->command("mount -n /proc"); +$uml->command("mount -o remount /"); +$uml->command("mount -a"); +$uml->command("/bin/hostname bootroot"); # Make the GID/UID 0 FS if ( $filesystem =~ /^mkcramfs/ || $filesystem =~ /^genromfs/ || diff --git a/yard/templates/Helper.yard b/yard/templates/Helper.yard index fbe742d..c77e53c 100644 --- a/yard/templates/Helper.yard +++ b/yard/templates/Helper.yard @@ -1,4 +1,4 @@ -# $Id: Helper.yard,v 1.10 2003/02/20 03:51:59 freesource Exp $ +# $Id: Helper.yard,v 1.11 2003/02/20 04:24:06 freesource Exp $ # Helper.yard # ############################################################################# @@ -16,15 +16,15 @@ dd # init - parent of all processes # Choose an inittab to compliment the traditional init in the page below. -/sbin/init -telinit -/sbin/shutdown -/sbin/halt -/etc/init.d/halt <= Replacements/etc/init.d/halt.example -/sbin/reboot -/etc/init.d/reboot <= Replacements/etc/init.d/reboot.example -/etc/init.d/rc <= Replacements/etc/init.d/rc.example -/etc/init.d/rcS <= Replacements/etc/init.d/rcS.helper +##/sbin/init +##telinit +##/sbin/shutdown +##/sbin/halt +##/etc/init.d/halt <= Replacements/etc/init.d/halt.example +##/sbin/reboot +##/etc/init.d/reboot <= Replacements/etc/init.d/reboot.example +##/etc/init.d/rc <= Replacements/etc/init.d/rc.example +##/etc/init.d/rcS <= Replacements/etc/init.d/rcS.helper ##/sbin/swapon # Login stuff