From: "Richard Farina" <zerochaos@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/
Date: Thu, 22 May 2014 20:28:50 +0000 (UTC) [thread overview]
Message-ID: <1400789135.c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c.zerochaos@gentoo> (raw)
commit: c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 19:38:09 2014 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu May 22 20:05:35 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=c7abfb38
Document the very large if structure for AUFS.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
---
defaults/linuxrc | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/defaults/linuxrc b/defaults/linuxrc
index b4ce21d..aaf27ad 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -733,7 +733,7 @@ then
test_success 'Mount filesystem'
FS_LOCATION='mnt/livecd'
# Setup the loopback mounts, if unencrypted
- else
+ else # if [ -n "${CRYPT_ROOT}" ]
if [ "${LOOPTYPE}" = 'normal' ]
then
good_msg 'Mounting loop filesystem'
@@ -801,13 +801,14 @@ then
test_success 'mount /dev/loop0 /'
FS_LOCATION='mnt/livecd'
fi
- fi
+ fi # if [ -n "${CRYPT_ROOT}" ]
if [ "${USE_AUFS_NORMAL}" -eq '1' ]
then
union_insert_dir ${UNION} ${NEW_ROOT}/${FS_LOCATION}
# Make sure fstab notes livecd is mounted ro. Makes system skip remount which fails on aufs dirs.
+ # TODO: remounting all tmpfs as RO seems weird, can we be more specific?
sed -e 's|\(.*\s/\s*tmpfs\s*\)defaults\(.*\)|\1defaults,ro\2|' /${UNION}/etc/fstab > /${UNION}/etc/fstab.new
mv /${UNION}/etc/fstab.new /${UNION}/etc/fstab
warn_msg "Adding all modules in $MODULESD/modules/"
@@ -843,7 +844,7 @@ then
setup_unionfs ${NEW_ROOT} /${FS_LOCATION}
CHROOT=/union
else
- #XXX Note to potential reviewers. diff formats this section very very oddly. Be sure to review this hunk after applied, do NOT simply read the diff
+ #XXX Note to potential reviewers. diff formats this section very very oddly. Be sure to review this hunk after applied, do NOT simply read the diff
if [ ! "${USE_AUFS_NORMAL}" -eq '1' ]
then
good_msg "Copying read-write image contents to tmpfs"
@@ -887,22 +888,22 @@ then
# It does not exist, make a link to the livecd
ln -s "/${FS_LOCATION}/${directory}" "${directory}" 2>/dev/null
current_parent="${directory}"
- fi
- done
- fi
- done
+ fi # if [ -e "/${NEW_ROOT}/${directory}" ] ... else
+ done # while read directory
+ fi # if [ -L "${NEW_ROOT}/${FS_LOCATION}/${x}" ] ... else
+ done # for x in ${ROOT_LINKS}
mkdir -p initramfs proc tmp run sys 2>/dev/null
chmod 1777 tmp
- fi
- #XXX: end extremely confusing hunk
+ fi # if [ ! "${USE_AUFS_NORMAL}" -eq '1' ]
+ #XXX: end extremely confusing hunk
- # have handy /mnt/cdrom (CDROOT_PATH) as well
- _new_cdroot="${NEW_ROOT}${CDROOT_PATH}"
- [ ! -d "${_new_cdroot}" ] && mkdir -p "${_new_cdroot}"
- mount --bind "${CDROOT_PATH}" "${_new_cdroot}"
+ # have handy /mnt/cdrom (CDROOT_PATH) as well
+ _new_cdroot="${NEW_ROOT}${CDROOT_PATH}"
+ [ ! -d "${_new_cdroot}" ] && mkdir -p "${_new_cdroot}"
+ mount --bind "${CDROOT_PATH}" "${_new_cdroot}"
- fi
+ fi # if [ "${USE_UNIONFS_NORMAL}" = '1' ] ... else
#UML=$(cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||')
#if [ "${UML}" = 'UML' ]
@@ -914,7 +915,7 @@ then
# Let Init scripts know that we booted from CD
export CDBOOT
CDBOOT=1
-else
+else # if [ "${CDROOT}" = '1' ]
if [ "${USE_UNIONFS_NORMAL}" = '1' ]
then
mkdir /union_changes
@@ -928,7 +929,7 @@ else
mkdir -p ${UNION}/tmp/.initrd
fi
-fi
+fi # if [ "${CDROOT}" = '1' ]
# Mount the additional things as required by udev & systemd
if [ -f ${NEW_ROOT}/etc/initramfs.mounts ]; then
@@ -959,7 +960,7 @@ for fs in $fslist; do
if ! $cmd; then
bad_msg "Unable to mount $dev for $fs"
fi
-done
+done # for fs in $fslist; do
# Execute script on the cdrom just before boot to update things if necessary
cdupdate
next reply other threads:[~2014-05-22 20:28 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 20:28 Richard Farina [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-29 19:04 [gentoo-commits] proj/genkernel:aufs commit in: defaults/ Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2015-04-29 19:04 Richard Farina
2014-09-23 0:21 Richard Farina
2014-09-23 0:21 Richard Farina
2014-09-05 16:11 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-09-05 16:09 Richard Farina
2014-05-24 21:35 Richard Farina
2014-05-24 21:35 Richard Farina
2014-05-24 21:35 Richard Farina
2014-05-22 20:28 Richard Farina
2014-05-22 20:28 Richard Farina
2014-05-22 20:28 Richard Farina
2014-03-17 19:38 Robin H. Johnson
2014-03-17 19:32 Robin H. Johnson
2014-03-17 19:20 Robin H. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400789135.c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c.zerochaos@gentoo \
--to=zerochaos@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox