diff options
author | Juan Francisco Cantero Hurtado <iam@juanfra.info> | 2014-08-01 23:47:50 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-04 10:22:47 +0000 |
commit | 0b2bf3f586cce937af2e6cb0c704685071346549 (patch) | |
tree | a9864e837d921b967556beb70ef98ca9a803c237 /setup-disk.in | |
parent | 8c64e9debee97248ba616e9ab9cb7eee55d8abd4 (diff) | |
download | alpine-conf-0b2bf3f586cce937af2e6cb0c704685071346549.zip |
Add support for btrfs to setup-disk.
Diffstat (limited to 'setup-disk.in')
-rw-r--r-- | setup-disk.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in index c20c619..bae373a 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -424,7 +424,12 @@ stop_all_raid() { init_progs() { local raidpkg= [ -n "$USE_RAID" ] && raidpkg="mdadm" - apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $@ + case $ROOTFS in + ext*) fstools=e2fsprogs; mkfs_args="-q";; + xfs) fstools=xfsprogs; mkfs_args="-q";; + btrfs) fstools=btrs-progs; mkfs_args="";; + esac + apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $fstools $@ } show_disk_info() { @@ -614,7 +619,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 +715,7 @@ data_only_disk_install() { # setup setup_root() { local root_dev="$1" boot_dev="$2" - mkfs.$ROOTFS -q "$root_dev" + mkfs.$ROOTFS $mkfs_args "$root_dev" mkdir -p "$SYSROOT" mount -t $ROOTFS $root_dev "$SYSROOT" || return 1 if [ -n "$boot_dev" ]; then |