diff options
author | Colin Guthrie <colin@mageia.org> | 2013-12-03 00:01:09 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-12-07 18:32:06 +0000 |
commit | 2137cf19edadc5e039ab9af523b1d5bc6e4ee136 (patch) | |
tree | 1865448fc321a488e24b89397066732c806cdf84 /rescue | |
parent | e7aedc3aa7e08f3337c86085c6da10ca83445024 (diff) | |
download | drakx-2137cf19edadc5e039ab9af523b1d5bc6e4ee136.tar drakx-2137cf19edadc5e039ab9af523b1d5bc6e4ee136.tar.gz drakx-2137cf19edadc5e039ab9af523b1d5bc6e4ee136.tar.bz2 drakx-2137cf19edadc5e039ab9af523b1d5bc6e4ee136.tar.xz drakx-2137cf19edadc5e039ab9af523b1d5bc6e4ee136.zip |
rescue: Tidy up dirs and aliases
Technically, because we don't actually switchroot into this filesystem
we don't need some of the directories and symlinks (as they are already
present in the initrd).
But with a long term view to making this a "real" filesystem that we DO
switchroot into, it makes sense to try and keep things vaguely valid.
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/aliases | 9 | ||||
-rw-r--r-- | rescue/dirs | 4 | ||||
-rwxr-xr-x | rescue/make_rescue_img | 20 |
3 files changed, 15 insertions, 18 deletions
diff --git a/rescue/aliases b/rescue/aliases index d92ea8ccf..ae924a86e 100644 --- a/rescue/aliases +++ b/rescue/aliases @@ -1,6 +1,9 @@ -/bin/vi vim-minimal -/lib/modules /modules -/usr/sbin/init /usr/lib/systemd/systemd +/bin usr/bin +/sbin usr/sbin +/lib usr/lib +/usr/bin/vi vim-minimal +/usr/sbin/init ../lib/systemd/systemd +/usr/lib/modules ../../modules /usr/lib/systemd/system/default.target rescue.target /usr/lib/systemd/system/rescue.target.wants/sockets.target ../sockets.target /usr/lib/systemd/system/dbus-org.freedesktop.machine1.service systemd-machined.service diff --git a/rescue/dirs b/rescue/dirs index 256a7f0f7..1b1153926 100644 --- a/rescue/dirs +++ b/rescue/dirs @@ -2,8 +2,8 @@ /proc /run /sys +/tmp /usr/bin /usr/sbin -/usr/lib -/tmp +/usr/lib/systemd/system/rescue.target.wants /modules diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 4b4301c55..49dc1a8d1 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -18,23 +18,23 @@ sub _ { __ @_; $? and die } my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); _ "rm -rf $tmp" if -e $tmp; _ "mkdir -p $tmp"; -_ "ln -s usr/bin $tmp/bin"; -_ "ln -s usr/sbin $tmp/sbin"; -_ "ln -s usr/lib $tmp/lib"; +_ "cp -a tree/* $tmp"; +_ "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"; } -_ "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"; -_ "mkdir -p $tmp/usr/lib/systemd/system/rescue.target.wants"; my %keytable_conflicts; my @less_important_keytables = qw(am_old am_phonetic no-dvorak de-latin1); @@ -51,12 +51,6 @@ 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/; |