diff options
author | Francesc Pinyol Margalef <francesc.pinyol.m@gmail.com> | 2013-12-21 13:37:33 +0100 |
---|---|---|
committer | Francesc Pinyol Margalef <francesc.pinyol.m@gmail.com> | 2013-12-21 13:37:33 +0100 |
commit | 095c6b25885ce3d22eedba8cdb98f1fd7e8708a5 (patch) | |
tree | 5bfc768996b3ddec185abeb02b602b48b14d10db /rescue/make_rescue_img | |
parent | df60191bdbddfa7c8e5bd11a2578aae6740963c0 (diff) | |
parent | f76dc0931e47338aa9c7db257d28e5015d8a2f47 (diff) | |
download | drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.gz drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.bz2 drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.xz drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.zip |
Merge branch 'master' of git://git.mageia.org/software/drakx
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-x | rescue/make_rescue_img | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 18c045acb..8e3f64334 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -15,19 +15,29 @@ BEGIN { undef *_ } sub __ { print @_, "\n"; system(@_) } sub _ { __ @_; $? and die } +my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); _ "rm -rf $tmp" if -e $tmp; -_ "mkdir $tmp"; -_ 'find . -name "*~" | xargs rm -f'; -mkdir_p($tmp . chomp_($_)) foreach cat_("dirs"); +_ "mkdir -p $tmp"; _ "cp -a tree/* $tmp"; -_ "find $tmp -name .svn | xargs rm -rf"; +_ "find $tmp -name '*~' -delete"; +mkdir_p($tmp . chomp_($_)) foreach cat_("dirs"); +foreach (cat_("aliases")) { + chomp; my ($f, $dest) = split; + symlink $dest, "$tmp$f"; +} +if ($arch eq "x86_64") { + _ "mkdir $tmp/usr/lib64"; + _ "ln -s usr/lib64 $tmp/lib64"; +} substInFile { s/DISTRIB_DESCR/$ENV{DISTRIB_DESCR}/ } "$tmp/etc/issue"; _ "../tools/install-xml-file-list list.xml $tmp"; -# / -> /usr move -_ "mkdir -p $tmp/usr/{,s}bin"; -_ "/usr/lib/dracut/modules.d/30convertfs/convertfs.sh $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"; +# Loading the floppy module causes this service to fail so lets mask this to +# prevent a red "FAILED" briefly showing on the screen +_ "sed -i s/ExecStart=/ExecStart=-/ $tmp/usr/lib/systemd/system/systemd-modules-load.service"; my %keytable_conflicts; my @less_important_keytables = qw(am_old am_phonetic no-dvorak de-latin1); @@ -44,20 +54,14 @@ foreach (keyboard::loadkeys_files(sub { warn @_ })) { } } -foreach (cat_("aliases")) { - chomp; my ($f, $dest) = split; - symlink $dest, "$tmp$f"; -} - - 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"; |