summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2015-09-02 15:49:06 -0700
committerJoey Hess2015-09-02 15:49:06 -0700
commit63b44fc8a59b5c2a49fde3f0bcb5fa4c69e8abce (patch)
tree9eb318498704bad8d6e70f66e846340aa5a552f6
parent851f7ebb8d598d9379a275df9b13303d3ac6d521 (diff)
mkfs quietly
-rw-r--r--src/Propellor/Property/Partition.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Propellor/Property/Partition.hs b/src/Propellor/Property/Partition.hs
index e4b067a5..c85ef8b9 100644
--- a/src/Propellor/Property/Partition.hs
+++ b/src/Propellor/Property/Partition.hs
@@ -25,19 +25,21 @@ formatted' opts YesReallyFormatPartition fs dev =
cmdProperty cmd opts' `requires` Apt.installed [pkg]
where
(cmd, opts', pkg) = case fs of
- EXT2 -> ("mkfs.ext2", eff optsdev, "e2fsprogs")
- EXT3 -> ("mkfs.ext3", eff optsdev, "e2fsprogs")
- EXT4 -> ("mkfs.ext4", eff optsdev, "e2fsprogs")
+ EXT2 -> ("mkfs.ext2", q $ eff optsdev, "e2fsprogs")
+ EXT3 -> ("mkfs.ext3", q $ eff optsdev, "e2fsprogs")
+ EXT4 -> ("mkfs.ext4", q $ eff optsdev, "e2fsprogs")
BTRFS -> ("mkfs.btrfs", optsdev, "btrfs-tools")
- REISERFS -> ("mkfs.reiserfs", "-ff":optsdev, "reiserfsprogs")
- XFS -> ("mkfs.xfs", "-f":optsdev, "xfsprogs")
+ REISERFS -> ("mkfs.reiserfs", q $ "-ff":optsdev, "reiserfsprogs")
+ XFS -> ("mkfs.xfs", "-f":q optsdev, "xfsprogs")
FAT -> ("mkfs.fat", optsdev, "dosfstools")
VFAT -> ("mkfs.vfat", optsdev, "dosfstools")
- NTFS -> ("mkfs.ntfs", eff optsdev, "ntfs-3g")
+ NTFS -> ("mkfs.ntfs", q $ eff optsdev, "ntfs-3g")
LinuxSwap -> ("mkswap", optsdev, "util-linux")
optsdev = opts++[dev]
-- -F forces creating a filesystem even if the device already has one
eff l = "-F":l
+ -- Be quiet.
+ q l = "-q":l
-- | Uses the kpartx utility to create device maps for partitions contained
-- within a disk image file. The resulting devices are passed to the