tag 329614 +patches
thanks

On Thu, Sep 22, 2005 at 11:29:26AM +0200, Joey Hess wrote:
> Package: initrd-tools
> Version: 0.1.82
> Severity: normal
> 
> If I am in /boot and I run mkinitrd -o foo 2.4.27, then I expect it to
> output to a file foo in the current directory. Instead it writes the
> output file somewhere inside the temporary tree, which is deleted when
> mkinitrd exits. Only if I run it with an absolute path do I get a file
> out.

Hi Joey,

I guess the problem is that the script internally cds into
the tmp directory, and thus relative paths become relative to that.

The following patch should fix this by making sure that
internally the path to the output image is fully qualified.

Bring on the initrd-tools relpacement !

-- 
Horms

Index: mkinitrd
===================================================================
--- mkinitrd    (revision 4166)
+++ mkinitrd    (working copy)
@@ -1327,6 +1327,9 @@
                ;;
        o)
                initrd_file="${OPTARG}"
+               if [ "$initrd_file" = "${initrd_file#/}" ]; then
+                       initrd_file="${ORIGDIR}/$initrd_file"
+               fi
                out=yes
                ;;
        r)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to