add support for -o option
PATCH 1/1 add support for -o option
From: Thiago Galesi <[email protected]>
Here's a patch to add -o suport to dracut, like in other mkinitrds
Signed-off-by Thiago Galesi <[email protected]>
--- dracut | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
dracut +10 -4
@@ -27,6 +27,10 @@ while [ $# -gt 0 ]; do allowlocal="yes" shift ;; + -o|--output) + outfile=$(readlink -f "$2") + shift 2 + ;; --allow-missing) shift ;;
@@ -40,10 +44,12 @@ if [ -n "$2" ]; then else kernel=$(uname -r) fi -if [ -n "$1" ]; then - outfile=$(readlink -f $1) -else - outfile="/boot/initrd-$kernel.img" +if [ -z "$outfile" ]; then + if [ -n "$1" ]; then + outfile=$(readlink -f $1) + else + outfile="/boot/initrd-$kernel.img" + fi fi if [ -f "$outfile" -a -z "$force" ]; then
Signature · 6 lines
1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html