diff options
author | Mystery Man <unknown@mandriva.org> | 2002-09-20 07:09:47 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-09-20 07:09:47 +0000 |
commit | 3701efa9b042f8b7fb0d89f014606c406ad31312 (patch) | |
tree | 602b8ace242667b7e9614d64cf15f3c95d8c5a74 /rescue/tree/sbin | |
parent | 6f1bbe0c09afd41c15ef66986f8a78a4fe8e4e54 (diff) | |
download | drakx-backup-do-not-use-1_1_9_51mdk.tar drakx-backup-do-not-use-1_1_9_51mdk.tar.gz drakx-backup-do-not-use-1_1_9_51mdk.tar.bz2 drakx-backup-do-not-use-1_1_9_51mdk.tar.xz drakx-backup-do-not-use-1_1_9_51mdk.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_9_51mdk'.V1_1_9_51mdk
Diffstat (limited to 'rescue/tree/sbin')
-rwxr-xr-x | rescue/tree/sbin/fakeshutdown | 39 | ||||
-rwxr-xr-x | rescue/tree/sbin/modprobe | 42 |
2 files changed, 0 insertions, 81 deletions
diff --git a/rescue/tree/sbin/fakeshutdown b/rescue/tree/sbin/fakeshutdown deleted file mode 100755 index c6d9b8440..000000000 --- a/rescue/tree/sbin/fakeshutdown +++ /dev/null @@ -1,39 +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 } - -print "\n"; - - -#- try to umount as much as possible; uses Pixel's ultra optimized algo (let you guess how it works..) -print "Umounting:\n"; -my @mounts = cat_('/proc/mounts'); -my $something_moved; -do { - $something_moved = 0; - foreach (@mounts) { - my $where = (split)[1]; - next if $where eq '/'; #- ouch! umounting the ramdisk on / always succeeds, and makes it becoming ro :-( - if (!system("umount $where 2>/dev/null")) { - print "\t$where\n"; - $something_moved++; - } - } -} while $something_moved; - - -#- shutdown with init -exec '/sbin/init', 6; diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe deleted file mode 100755 index 84de032e2..000000000 --- a/rescue/tree/sbin/modprobe +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl - -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 read_already_loaded() { - foreach (cat_("/proc/modules")) { - my ($name) = split; - $conf{$name}{loaded} = 1; - } -} - -sub load_deps($) { - my ($file) = @_; - - local *F; - open F, $file or log::l("error opening $file: $!"), return 0; - foreach (<F>) { - my ($f, $deps) = split ':'; - push @{$deps{$f}}, split ' ', $deps; - } -} - -sub load { - my ($name, @options) = @_; - $name =~ s/\.o//; - - $conf{$name}{loaded} and return; - eval { load($_, 'prereq') } foreach @{$deps{$name}}; - - system("packdrake -x /modules/modules.cz* /tmp $name.o"); - -r "/tmp/$name.o" or die "can't find module $name\n"; - system("/sbin/insmod /tmp/$name.o"); - my $retval = $?; - system("rm /tmp/$name.o"); - $retval and die("insmod $name failed"); -} - -!@ARGV || $ARGV[0] =~ /-h/ and die "usage: modprobe <module> [<options...>]\n"; - -read_already_loaded(); -load_deps("/modules/modules.dep"); -load(@ARGV); |