diff options
author | Mystery Man <unknown@mandriva.org> | 2005-04-05 19:41:54 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2005-04-05 19:41:54 +0000 |
commit | 1d9a4b73a37c6e942f909c2d42ca13b5c47e8362 (patch) | |
tree | 5bab4266bc57a31d97ac6a8badc2ede721a42c9c /rescue/install_bootloader | |
parent | 4691e29d1228b10abbe586c5ecb87ec9e13bd3ec (diff) | |
download | drakx-backup-do-not-use-10_2_20mdk.tar drakx-backup-do-not-use-10_2_20mdk.tar.gz drakx-backup-do-not-use-10_2_20mdk.tar.bz2 drakx-backup-do-not-use-10_2_20mdk.tar.xz drakx-backup-do-not-use-10_2_20mdk.zip |
This commit was manufactured by cvs2svn to create tag 'V10_2_20mdk'.V10_2_20mdk
Diffstat (limited to 'rescue/install_bootloader')
-rwxr-xr-x | rescue/install_bootloader | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/rescue/install_bootloader b/rescue/install_bootloader deleted file mode 100755 index d49a04581..000000000 --- a/rescue/install_bootloader +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/perl -# -# Guillaume Cottenceau (gc@mandrakesoft.com) -# -# Copyright 2001 Mandrakesoft -# -# This software may be freely redistributed under the terms of the GNU -# public license. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - - -sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l } -sub chomp_ { my @l = map { my $l = $_; chomp $l; $l } @_; wantarray ? @l : $l[0] } - -system('guessmounts') and die; - -#- this is dangerous, try to take care -my @mounts = cat_('/proc/mounts'); -grep { (split)[1] =~ m|^/mnt$| } @mounts or die "Your root device isn't mounted on /mnt (according to /proc/mounts)\n"; --x '/mnt/sbin/lilo' or die "/mnt/sbin/lilo isn't executable, exiting.\n"; --r '/mnt/etc/lilo.conf' or die "/mnt/etc/lilo.conf isn't readable, exiting.\n"; -my ($f) = grep { -f $_ } map { "/mnt/etc/$_" } 'mandrakelinux-release', 'mandrake-release'; -$f && cat_($f) =~ /Mandrake/ or die "$f doesn't contain 'Mandrake', exiting.\n"; - -print "About to re-install Boot Loader of following Mandrake distro:\n\t", - chomp_(cat_ "/mnt/etc/mandrake-release"), - "\n=> ok? <press Enter to continue, 'n' and Enter to cancel> "; -<STDIN> =~ /^n/i and exit 0; - -exec '/mnt/sbin/lilo', '-r', '/mnt'; - -die "error: couldn't exec /mnt/sbin/lilo.\n"; - - -#------------------------------------------------- -#- $Log$ -#- Revision 1.3 2004/09/28 06:24:30 prigaux -#- handle /etc/mandrakelinux-release -#- -#- Revision 1.2 2004/07/20 02:42:12 prigaux -#- MandrakeSoft -> Mandrakesoft -#- -#- Revision 1.1 2001/10/24 22:34:01 gc -#- - add a GUI to the rescue -#- - provide guessmounts with better efficiency and output, go to console, and reboot -#- - provide install_bootloader which runs lilo from /mnt if it seems safe -#- - add lsparts to rescue, which prints partitions with detected types -#- -#- -#- |