1 |
commit: 98da3645c1cd72895af0c9131db6024388f63af2 |
2 |
Author: Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com> |
3 |
AuthorDate: Wed Jun 4 23:04:30 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=98da3645 |
7 |
|
8 |
This introduces changes to former commits d8e2d4d & 720a60f in |
9 |
which there are fstab changes and tmpfs mounts which are combined |
10 |
into one /etc/fstab instead. |
11 |
|
12 |
defaults/linuxrc | 32 +++++++++++++------------------- |
13 |
1 file changed, 13 insertions(+), 19 deletions(-) |
14 |
|
15 |
diff --git a/defaults/linuxrc b/defaults/linuxrc |
16 |
index a6c4806..8b3ff87 100644 |
17 |
--- a/defaults/linuxrc |
18 |
+++ b/defaults/linuxrc |
19 |
@@ -794,9 +794,19 @@ then |
20 |
# Function to handle the RC_NO_UMOUNTS variable in ${CHROOT}/etc/rc.conf |
21 |
conf_rc_no_umounts |
22 |
|
23 |
- # Fstab change for aufs |
24 |
- test ! $(grep -o ^aufs "${CHROOT}"/etc/fstab) && |
25 |
- echo "aufs / aufs defaults 0 0" > "${CHROOT}"/etc/fstab |
26 |
+ # Fstab changes for aufs |
27 |
+ if ! grep -q '^aufs' "${CHROOT}"/etc/fstab 2>/dev/null; then |
28 |
+ for i in /var/tmp /tmp /usr/portage/distfiles; do |
29 |
+ [ ! -d "${CHROOT}${i}" ] && mkdir -p "${CHROOT}${i}" |
30 |
+ done |
31 |
+ |
32 |
+ cat > "${CHROOT}"/etc/fstab << FSTAB |
33 |
+aufs / aufs defaults 0 0 |
34 |
+vartmp /var/tmp tmpfs defaults 0 0 |
35 |
+tmp /tmp tmpfs defaults 0 0 |
36 |
+distfiles /usr/portage/distfiles tmpfs defaults 0 0 |
37 |
+FSTAB |
38 |
+ fi |
39 |
|
40 |
if ${AUFS_MODULES}; then |
41 |
warn_msg "Adding all modules in $MODULESD/modules/" |
42 |
@@ -990,22 +1000,6 @@ then |
43 |
chmod 755 "${CHROOT}${i}" |
44 |
done |
45 |
|
46 |
- # This will prevent from putting junk on the CHANGESDEV |
47 |
- str="" |
48 |
- for i in /tmp /var/tmp /usr/portage/distfiles |
49 |
- do |
50 |
- mkdir -p "${CHROOT}${i}" |
51 |
- chmod 755 "${CHROOT}${i}" |
52 |
- |
53 |
- mount -t tmpfs tmpfs "${CHROOT}${i}" |
54 |
- str="${i} ${str}" |
55 |
- done |
56 |
- |
57 |
- warn_msg "${str}are mounted in ram" |
58 |
- warn_msg "consider saving important files elsewhere" |
59 |
- |
60 |
- sleep 2 |
61 |
- |
62 |
for i in ${CDROOT_PATH} ${overlay} ${static}; do |
63 |
mount --move ${NEW_ROOT}${i} ${CHROOT}${i} |
64 |
done |