summaryrefslogtreecommitdiffstats
path: root/rescue/tree/sbin/fakeshutdown
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-07-31 23:10:55 +0000
committerMystery Man <unknown@mandriva.org>2002-07-31 23:10:55 +0000
commit6b5bb447b11a31fc0961c20485505a633c9ab4eb (patch)
treeeae73bee290e1e328b539f7649818d7584ee667e /rescue/tree/sbin/fakeshutdown
parent79d226c48d6de4f26c604ddbd0ce769a58d548c6 (diff)
downloaddrakx-6b5bb447b11a31fc0961c20485505a633c9ab4eb.tar
drakx-6b5bb447b11a31fc0961c20485505a633c9ab4eb.tar.gz
drakx-6b5bb447b11a31fc0961c20485505a633c9ab4eb.tar.bz2
drakx-6b5bb447b11a31fc0961c20485505a633c9ab4eb.tar.xz
drakx-6b5bb447b11a31fc0961c20485505a633c9ab4eb.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_8_16mdk'.V1_1_8_16mdk
Diffstat (limited to 'rescue/tree/sbin/fakeshutdown')
-rwxr-xr-xrescue/tree/sbin/fakeshutdown39
1 files changed, 0 insertions, 39 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;