Gentoo Archives: gentoo-commits

From: Richard Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/
Date: Fri, 05 Sep 2014 16:09:56
Message-Id: 1403565074.854a835ede60717a9b4ac847b5e3e56877c35338.zerochaos@gentoo
1 commit: 854a835ede60717a9b4ac847b5e3e56877c35338
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: Mon Jun 23 23:11:14 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=854a835e
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 ---
15 defaults/initrd.scripts | 11 ++---------
16 defaults/linuxrc | 7 ++++---
17 2 files changed, 6 insertions(+), 12 deletions(-)
18
19 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
20 index bf4124f..aded9ad 100644
21 --- a/defaults/initrd.scripts
22 +++ b/defaults/initrd.scripts
23 @@ -1363,10 +1363,9 @@ getdvhoff() {
24 }
25
26 setup_squashfs_aufs() {
27 - (
28 # Setup aufs directories and vars
29 - local overlay=/mnt/overlay
30 - local static=/mnt/livecd
31 + overlay=/mnt/overlay
32 + static=/mnt/livecd
33
34 for i in "${overlay}" "${static}"; do
35 [ ! -d "${i}" ] && mkdir -p "${i}"
36 @@ -1381,12 +1380,6 @@ setup_squashfs_aufs() {
37 [ ! -d "${NEW_ROOT}${overlay}" ] && mkdir -p "${NEW_ROOT}${overlay}"
38 [ ! -d "${NEW_ROOT}${static}" ] && mkdir -p "${NEW_ROOT}${static}"
39 for i in "${overlay}" "${static}"; do mount --move "${i}" "${NEW_ROOT}${i}"; done
40 -
41 - # have handy /mnt/cdrom (CDROOT_PATH) as well
42 - local new_cdroot="${NEW_ROOT}${CDROOT_PATH}"
43 - [ ! -d "${new_cdroot}" ] && mkdir -p "${new_cdroot}"
44 - mount --bind "${CDROOT_PATH}" "${new_cdroot}"
45 - )
46 }
47
48 setup_unionfs() {
49
50 diff --git a/defaults/linuxrc b/defaults/linuxrc
51 index d5b424c..0a91c58 100644
52 --- a/defaults/linuxrc
53 +++ b/defaults/linuxrc
54 @@ -995,7 +995,7 @@ then
55 mkdir -p /${CHROOT}/.unions/memory
56 mount -o move /memory /${CHROOT}/.unions/memory
57 test_success "Failed to move aufs /memory into the system root"
58 - for i in mnt/gentoo mnt/livecd ${CDROOT_PATH}
59 + for i in mnt/gentoo mnt/livecd /mnt/overlay ${CDROOT_PATH}
60 do
61 mkdir -p ${CHROOT}/$i
62 chmod 755 ${CHROOT}/$i
63 @@ -1012,8 +1012,9 @@ then
64 warn_msg "${str}are mounted in ram"
65 warn_msg "consider saving important files elsewhere..."
66 read -t 3 UNUSEDVAL
67 - mount --bind ${NEW_ROOT}${CDROOT_PATH} ${CHROOT}${CDROOT_PATH}
68 - mount --bind ${NEW_ROOT}/mnt/livecd ${CHROOT}/mnt/livecd
69 + for i in ${CDROOT_PATH} ${overlay} ${static}; do
70 + mount --move ${NEW_ROOT}${i} ${CHROOT}${i}
71 + done
72 fi
73
74 good_msg "Booting (initramfs)"