summaryrefslogtreecommitdiff
path: root/debian/local
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2016-01-26 03:51:30 +0000
committerDimitri John Ledkov <xnox@ubuntu.com>2016-05-10 10:14:50 +0100
commit2a390cd010973170ca1782bdfcc81e10956499d6 (patch)
tree1830db46d2e7355894004f49d12b52f0a5b53f26 /debian/local
parent58e631d01823afd60e52f3a09887f270a91889a0 (diff)
Show only errors from boot-time "btrfs scan" if "quiet" is used
When the "quiet" kernel parameter is used, redirect stdout in the initramfs boot script to /dev/null. Stop redirecting stderr, as any errors should still be shown.
Diffstat (limited to 'debian/local')
-rw-r--r--debian/local/btrfs.local-premount4
1 files changed, 3 insertions, 1 deletions
diff --git a/debian/local/btrfs.local-premount b/debian/local/btrfs.local-premount
index 7f7bf27c..aea71286 100644
--- a/debian/local/btrfs.local-premount
+++ b/debian/local/btrfs.local-premount
@@ -19,5 +19,7 @@ esac
if [ -x /bin/btrfs ]
then
modprobe btrfs
- /bin/btrfs device scan 2> /dev/null
+ # If asked to be quiet, show only errors
+ [ "${quiet}" = "y" ] && exec >/dev/null
+ /bin/btrfs device scan
fi