diff options
author | Mystery Man <unknown@mandriva.org> | 2005-08-30 18:55:27 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2005-08-30 18:55:27 +0000 |
commit | ea3a905b182f34bba2f071111d5263f1868c4a6f (patch) | |
tree | 45713836a82198448c93696b30f3c9ab7ba9aa4a /rescue/tree/sbin/fakeshutdown | |
parent | f5427227e11f6025648f9537ffd3110c003f7e25 (diff) | |
download | drakx-backup-do-not-use-ea3a905b182f34bba2f071111d5263f1868c4a6f.tar drakx-backup-do-not-use-ea3a905b182f34bba2f071111d5263f1868c4a6f.tar.gz drakx-backup-do-not-use-ea3a905b182f34bba2f071111d5263f1868c4a6f.tar.bz2 drakx-backup-do-not-use-ea3a905b182f34bba2f071111d5263f1868c4a6f.tar.xz drakx-backup-do-not-use-ea3a905b182f34bba2f071111d5263f1868c4a6f.zip |
This commit was manufactured by cvs2svn to create tagV10_3_0_50mdk
'V10_3_0_50mdk'.
Diffstat (limited to 'rescue/tree/sbin/fakeshutdown')
-rwxr-xr-x | rescue/tree/sbin/fakeshutdown | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/rescue/tree/sbin/fakeshutdown b/rescue/tree/sbin/fakeshutdown deleted file mode 100755 index 3511020ff..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; |