1 |
commit: f29d304e5d71f65778ea7bff7e9628851bb17ed5 |
2 |
Author: Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com> |
3 |
AuthorDate: Thu May 29 08:15:13 2014 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 17:31:45 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=f29d304e |
7 |
|
8 |
Removing --bind on some directories to prevent ${NEW_ROOT} path |
9 |
from existing in favor of --move. |
10 |
|
11 |
Got rid of the no longer required subshell call for aufs ${NEW_ROOT} |
12 |
overlay. |
13 |
|
14 |
defaults/initrd.scripts | 11 ++--------- |
15 |
defaults/linuxrc | 7 ++++--- |
16 |
2 files changed, 6 insertions(+), 12 deletions(-) |
17 |
|
18 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
19 |
index c76abb5..2fe540b 100644 |
20 |
--- a/defaults/initrd.scripts |
21 |
+++ b/defaults/initrd.scripts |
22 |
@@ -1363,10 +1363,9 @@ getdvhoff() { |
23 |
} |
24 |
|
25 |
setup_squashfs_aufs() { |
26 |
- ( |
27 |
# Setup aufs directories and vars |
28 |
- local overlay=/mnt/overlay |
29 |
- local static=/mnt/livecd |
30 |
+ overlay=/mnt/overlay |
31 |
+ static=/mnt/livecd |
32 |
|
33 |
for i in "${overlay}" "${static}"; do |
34 |
[ ! -d "${i}" ] && mkdir -p "${i}" |
35 |
@@ -1381,12 +1380,6 @@ setup_squashfs_aufs() { |
36 |
[ ! -d "${NEW_ROOT}${overlay}" ] && mkdir -p "${NEW_ROOT}${overlay}" |
37 |
[ ! -d "${NEW_ROOT}${static}" ] && mkdir -p "${NEW_ROOT}${static}" |
38 |
for i in "${overlay}" "${static}"; do mount --move "${i}" "${NEW_ROOT}${i}"; done |
39 |
- |
40 |
- # have handy /mnt/cdrom (CDROOT_PATH) as well |
41 |
- local new_cdroot="${NEW_ROOT}${CDROOT_PATH}" |
42 |
- [ ! -d "${new_cdroot}" ] && mkdir -p "${new_cdroot}" |
43 |
- mount --bind "${CDROOT_PATH}" "${new_cdroot}" |
44 |
- ) |
45 |
} |
46 |
|
47 |
setup_unionfs() { |
48 |
|
49 |
diff --git a/defaults/linuxrc b/defaults/linuxrc |
50 |
index d5b424c..0a91c58 100644 |
51 |
--- a/defaults/linuxrc |
52 |
+++ b/defaults/linuxrc |
53 |
@@ -995,7 +995,7 @@ then |
54 |
mkdir -p /${CHROOT}/.unions/memory |
55 |
mount -o move /memory /${CHROOT}/.unions/memory |
56 |
test_success "Failed to move aufs /memory into the system root" |
57 |
- for i in mnt/gentoo mnt/livecd ${CDROOT_PATH} |
58 |
+ for i in mnt/gentoo mnt/livecd /mnt/overlay ${CDROOT_PATH} |
59 |
do |
60 |
mkdir -p ${CHROOT}/$i |
61 |
chmod 755 ${CHROOT}/$i |
62 |
@@ -1012,8 +1012,9 @@ then |
63 |
warn_msg "${str}are mounted in ram" |
64 |
warn_msg "consider saving important files elsewhere..." |
65 |
read -t 3 UNUSEDVAL |
66 |
- mount --bind ${NEW_ROOT}${CDROOT_PATH} ${CHROOT}${CDROOT_PATH} |
67 |
- mount --bind ${NEW_ROOT}/mnt/livecd ${CHROOT}/mnt/livecd |
68 |
+ for i in ${CDROOT_PATH} ${overlay} ${static}; do |
69 |
+ mount --move ${NEW_ROOT}${i} ${CHROOT}${i} |
70 |
+ done |
71 |
fi |
72 |
|
73 |
good_msg "Booting (initramfs)" |