]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: use derror for error messages
authorHarald Hoyer <harald@redhat.com>
Wed, 2 Feb 2011 12:38:07 +0000 (13:38 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 2 Feb 2011 12:56:04 +0000 (13:56 +0100)
dracut

diff --git a/dracut b/dracut
index 2122d1c7afb9bb0eab8c21d74e90f52a61d0dcea..85884f7ad18acd4c072e2b353a21fddd4f661f29 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -215,9 +215,9 @@ fw_dir=${fw_dir//:/ }
 if [[ -f $dracutbasedir/dracut-functions ]]; then
     . $dracutbasedir/dracut-functions
 else
-    echo "Cannot find $dracutbasedir/dracut-functions."
-    echo "Are you running from a git checkout?"
-    echo "Try passing -l as an argument to $0"
+    derror "Cannot find $dracutbasedir/dracut-functions."
+    derror "Are you running from a git checkout?"
+    derror "Try passing -l as an argument to $0"
     exit 1
 fi
 
@@ -264,19 +264,19 @@ srcmods="/lib/modules/$kernel/"
 export srcmods
 
 if [[ -f $outfile && ! $force ]]; then
-    echo "Will not override existing initramfs ($outfile) without --force"
+    derror "Will not override existing initramfs ($outfile) without --force"
     exit 1
 fi
 
 outdir=${outfile%/*}
 if [[ ! -d "$outdir" ]]; then
-    echo "Can't write $outfile: Directory $outdir does not exist."
+    derror "Can't write $outfile: Directory $outdir does not exist."
     exit 1
 elif [[ ! -w "$outdir" ]]; then
-    echo "No permission to write $outdir."
+    derror "No permission to write $outdir."
     exit 1
 elif [[ -f "$outfile" && ! -w "$outfile" ]]; then
-    echo "No permission to write $outfile."
+    derror "No permission to write $outfile."
     exit 1
 fi