]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add debug and changed verbose parameter
authorHarald Hoyer <harald@redhat.com>
Fri, 15 May 2009 10:45:58 +0000 (12:45 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 May 2009 10:45:58 +0000 (12:45 +0200)
previous -verbose is now -debug (set -x)
-verbose adds some information about the resulting initrd size

Makefile
dracut

index ef264eb71a6b87095614767f356d52b45b49ab0f..7053cd967d14f406a131121dae88aef34af9661c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,5 +44,5 @@ check:
        done;exit $$ret
 
 testimage: all
-       ./dracut -l -f test-$(shell uname -r).img $(shell uname -r)
+       ./dracut -v -l -f test-$(shell uname -r).img $(shell uname -r)
        @echo wrote  test-$(shell uname -r).img 
diff --git a/dracut b/dracut
index 7a14765a001852726dfe318524f87a780c4974c6..4d42e827830fcf5fdad23d05f342ee82fba2aa8a 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -15,7 +15,8 @@ while (($# > 0)); do
        -d|--drivers) modules_l="$2"; shift;;
        -h|--help) echo "Usage: $0 [-f] <initramfs> <kernel-version>"
            exit 1 ;;
-       -v|--verbose) set -x;;
+       -d|--debug) set -x;;
+       -v|--verbose) beverbose="yes";;
        -c|--conf) conffile="$2"; shift;;
        -l|--local) allowlocal="yes" ;;
        -h|--hostonly) hostonly="-h" ;;
@@ -108,4 +109,10 @@ ldconfig -n -r "$initdir" /lib* /usr/lib*
     cp -a -t "$initdir$include_target" "$include_src"/*
 }
 
+[[ "$beverbose" = "yes" ]] && (du -c "$initdir" | sort -n)
+
 ( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )
+
+[[ "$beverbose" = "yes" ]] && ls -lh "$outfile"
+
+: