blob: 5b27ef09b5826f25624575dd1fecb9066b37e457 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
From 745fe99e8be2f889ff79a544dd6a314b69437258 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 6 Aug 2009 09:24:24 +0000
Subject: [PATCH 1/2] mkinitfs: support for -q. echo to stdout rather than stderr
---
mkinitfs.in | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/mkinitfs.in b/mkinitfs.in
index 5b7bfbd..c0746fe 100755
--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -152,6 +152,7 @@ options:
-l only list files that would have been used
-L list available features
-o set another outfile
+ -q Quiet mode
-t use tempdir when creating initramfs image
EOF
@@ -161,7 +162,7 @@ EOF
# main
-while getopts "b:c:f:F:hi:kLlo:t:" opt; do
+while getopts "b:c:f:F:hi:kLlo:qt:" opt; do
case "$opt" in
b) basedir="$OPTARG";;
c) config="$OPTARG";;
@@ -173,6 +174,7 @@ while getopts "b:c:f:F:hi:kLlo:t:" opt; do
L) list_features=1;;
l) list_sources=1;;
o) outfile="$OPTARG";;
+ q) quiet=1;;
t) tmpdir="$OPTARG";;
*) usage;;
esac
@@ -218,8 +220,8 @@ if [ -z "$keeptmp" ]; then
[ -d "$tmpdir" ] && rm -rf "$tmpdir"/*
fi
-if [ -z "$list_sources" ]; then
- echo "==> initramfs: creating $outfile" >&2
+if [ -z "$list_sources" ] && [ -z "$quiet" ]; then
+ echo "==> initramfs: creating $outfile"
fi
initfs_base || exit 1
initfs_kmods || exit 1
--
1.6.4
|