summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-10-20 16:51:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-10-20 16:51:36 +0000
commit21bd24a5b667942d83eb892c932f97c98c525478 (patch)
tree27b94dc01e6c75164a8f8c5c8c92ddcb2ea6259a
parente871d7c4fa1c6c82e968c679a3a54872cd9b1700 (diff)
downloaddrakx-21bd24a5b667942d83eb892c932f97c98c525478.tar
drakx-21bd24a5b667942d83eb892c932f97c98c525478.tar.gz
drakx-21bd24a5b667942d83eb892c932f97c98c525478.tar.bz2
drakx-21bd24a5b667942d83eb892c932f97c98c525478.tar.xz
drakx-21bd24a5b667942d83eb892c932f97c98c525478.zip
add option --auto to install without prompting
-rwxr-xr-xrescue/install_bootloader8
1 files changed, 7 insertions, 1 deletions
diff --git a/rescue/install_bootloader b/rescue/install_bootloader
index 59248a016..ba43eff84 100755
--- a/rescue/install_bootloader
+++ b/rescue/install_bootloader
@@ -17,6 +17,10 @@ use common;
use bootloader;
use fs;
+if ($ARGV[0] eq '--auto') {
+ $auto = shift @ARGV;
+}
+
$::prefix = '/mnt';
my $release = common::mandrake_release($::prefix) ||
@@ -58,6 +62,8 @@ my $install = $bootloader::{'install_raw_' . $main_method} or die "unknown bootl
print "About to re-install Boot Loader $main_method of following Mandriva Linux distribution:\n\t",
$release,
"\n=> ok? <press Enter to continue, 'n' and Enter to cancel> ";
-<STDIN> =~ /^n/i and exit 0;
+if (!$auto) {
+ <STDIN> =~ /^n/i and exit 0;
+}
$install->();