X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from fnsib-smtp02.srv.cat (fnsib-smtp02.srv.cat [46.16.60.193]) by mail.alpinelinux.org (Postfix) with ESMTP id B2C43DC00DA for ; Fri, 1 Aug 2014 00:39:40 +0000 (UTC) Received: from localhost (unknown [84.76.233.227]) by fnsib-smtp02.srv.cat (Postfix) with ESMTPSA id 2F04E80D7; Fri, 1 Aug 2014 02:39:38 +0200 (CEST) From: Juan Francisco Cantero Hurtado To: alpine-devel@lists.alpinelinux.org Cc: Juan Francisco Cantero Hurtado Subject: [alpine-devel] [PATCH] Add btrfs-progs to init_progs(). Use "-q" only when the tool supports this switch. Date: Fri, 1 Aug 2014 02:39:35 +0200 Message-Id: <1406853575-30650-1-git-send-email-iam@juanfra.info> X-Mailer: git-send-email 1.9.3 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- setup-disk.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setup-disk.in b/setup-disk.in index c20c619..f41a464 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -424,7 +424,7 @@ stop_all_raid() { init_progs() { local raidpkg= [ -n "$USE_RAID" ] && raidpkg="mdadm" - apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $@ + apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux btrfs-progs $@ } show_disk_info() { @@ -519,7 +519,11 @@ setup_boot_dev() { --metadata=0.90 --quiet --run $@ $missing || return 1 bootdev=/dev/md0 fi - mkfs.$BOOTFS -q $bootdev + local mkfs_args= + if [ "$BOOTFS" != "btrfs" ]; then + mkfs_args="-q" + fi + mkfs.$BOOTFS $mkfs_args $bootdev BOOT_DEV="$bootdev" } @@ -614,7 +618,7 @@ setup_var() { local var_dev="$1" local varfs=${VARFS} echo "Creating file systems..." - mkfs.$varfs -q $var_dev >/dev/null || return 1 + mkfs.$varfs $var_dev >/dev/null || return 1 sed -i -e '/[[:space:]]\/var[[:space:]]/d' /etc/fstab echo -e "${var_dev}\t/var\t\t${varfs}\tdefaults 1 2" >> /etc/fstab @@ -710,7 +714,11 @@ data_only_disk_install() { # setup setup_root() { local root_dev="$1" boot_dev="$2" - mkfs.$ROOTFS -q "$root_dev" + local mkfs_args= + if [ "$ROOTFS" != "btrfs" ]; then + mkfs_args="-q" + fi + mkfs.$ROOTFS $mkfs_args "$root_dev" mkdir -p "$SYSROOT" mount -t $ROOTFS $root_dev "$SYSROOT" || return 1 if [ -n "$boot_dev" ]; then -- 1.9.3 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---