summaryrefslogtreecommitdiffstats
path: root/rescue/tree/usr/sbin/fakeshutdown
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-12-01 22:29:20 +0000
committerColin Guthrie <colin@mageia.org>2013-12-07 18:32:06 +0000
commitc4634f60b5c6d67eedfedc02166499884e4d6625 (patch)
tree844fb25572edbf617eaeccc7633d0031e7df1ec6 /rescue/tree/usr/sbin/fakeshutdown
parent645e6932216fddd154865a9bebb0fd0e3beed301 (diff)
downloaddrakx-c4634f60b5c6d67eedfedc02166499884e4d6625.tar
drakx-c4634f60b5c6d67eedfedc02166499884e4d6625.tar.gz
drakx-c4634f60b5c6d67eedfedc02166499884e4d6625.tar.bz2
drakx-c4634f60b5c6d67eedfedc02166499884e4d6625.tar.xz
drakx-c4634f60b5c6d67eedfedc02166499884e4d6625.zip
rescue: Use systemd as initsystem.
This commit converts the rescue system to systemd rather than the legacy sysvinit. Besides being faster, one primary advantage of running systemd here is that we can "boot" the system we're inspecting via systemd-nspawn to properly test it. Note: Bits that don't work: * nspawn * old dracut initqueue udev rules in /etc/ are not cleaned out (drop in support error?) * the gui may loop differently now
Diffstat (limited to 'rescue/tree/usr/sbin/fakeshutdown')
-rwxr-xr-xrescue/tree/usr/sbin/fakeshutdown39
1 files changed, 0 insertions, 39 deletions
diff --git a/rescue/tree/usr/sbin/fakeshutdown b/rescue/tree/usr/sbin/fakeshutdown
deleted file mode 100755
index 309f26c6c..000000000
--- a/rescue/tree/usr/sbin/fakeshutdown
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Guillaume Cottenceau (gc)
-#
-# 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.
-#
-
-# From MDK::Common:
-sub cat_ { open(my $F, '<', $_[0]) or die "cat of file $_[0] failed: $!\n"; 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;