From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DFB5D1393E9 for ; Thu, 22 May 2014 20:28:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75927E09E7; Thu, 22 May 2014 20:28:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7E5FCE09E5 for ; Thu, 22 May 2014 20:28:52 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7270333FF3F for ; Thu, 22 May 2014 20:28:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 20DD7182D5 for ; Thu, 22 May 2014 20:28:50 +0000 (UTC) From: "Richard Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Farina" Message-ID: <1400789135.c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c.zerochaos@gentoo> Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c X-VCS-Branch: aufs Date: Thu, 22 May 2014 20:28:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 61072197-f914-4525-809b-b731f26ea81f X-Archives-Hash: 81e4286121a05165fd20c8c659e36d75 commit: c7abfb38a783e2cbfa8ccfe01fc7f257c19bca3c Author: Robin H. Johnson gentoo org> AuthorDate: Mon Mar 17 19:38:09 2014 +0000 Commit: Richard Farina gentoo 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 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