summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
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/make_rescue_img
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/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img13
1 files changed, 8 insertions, 5 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index 432a6cf94..50083d0b0 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -17,7 +17,7 @@ sub _ { __ @_; $? and die }
my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch();
_ "rm -rf $tmp" if -e $tmp;
-_ "mkdir -p $tmp/usr/{bin,sbin,lib}";
+_ "mkdir -p $tmp";
_ "ln -s usr/bin $tmp/bin";
_ "ln -s usr/sbin $tmp/sbin";
_ "ln -s usr/lib $tmp/lib";
@@ -25,13 +25,16 @@ if ($arch eq "x86_64") {
_ "mkdir $tmp/usr/lib64";
_ "ln -s usr/lib64 $tmp/lib64";
}
-_ 'find . -name "*~" | xargs rm -f';
-mkdir_p($tmp . chomp_($_)) foreach cat_("dirs");
_ "cp -a tree/* $tmp";
+_ "find $tmp -name '*~' -delete";
+mkdir_p($tmp . chomp_($_)) foreach cat_("dirs");
substInFile { s/DISTRIB_DESCR/$ENV{DISTRIB_DESCR}/ } "$tmp/etc/issue";
_ "../tools/install-xml-file-list list.xml $tmp";
+_ "sed 's/Mageia \\([0-9]*\\)/Mageia Rescue \\1/' /etc/os-release >$tmp/etc/os-release";
+_ "ls -1 $tmp/etc | sed 's,\\(.*\\),/etc/\\1,' >>$tmp/usr/share/symlinks";
+
my %keytable_conflicts;
my @less_important_keytables = qw(am_old am_phonetic no-dvorak de-latin1);
foreach (keyboard::loadkeys_files(sub { warn @_ })) {
@@ -56,11 +59,11 @@ foreach (cat_("aliases")) {
if (my ($LANGUAGE) = map { if_(/LANGUAGE_(.*)/, $1) } keys %ENV) {
substInFile {
$_ = "export LANGUAGE=$LANGUAGE\n" . "export LC_ALL=$LANGUAGE\n" if /^#LANGUAGE/;
- } "$tmp/etc/rc.sysinit";
+ } "$tmp/usr/bin/mageia-rescue";
}
exit 0 if $ARGV[0];
_ "mksquashfs $tmp $rescue -all-root -noappend >/dev/null";
_ "chmod 755 $rescue";
-_ "rm -rf $tmp";
+#_ "rm -rf $tmp";