[PATCH] anaconda-dracut: fix ks failure with hd:<dev>:some/path.ks
Vratislav Podzimek
vpodzime at redhat.com
Tue Sep 17 06:14:04 UTC 2013
On Mon, 2013-09-16 at 14:27 -0400, Will Woods wrote:
> When we try to grab the kickstart from disk, $tmpmnt will be something
> like /run/install/tmpmnt1, and $path is the user-provided bit after the
> second ':'.
>
> If your path doesn't start with a / (say "myks.cfg"), we'd mount $dev
> then do "cp /run/install/tmpmnt1myks.cfg /tmp/ks.cfg". Which fails.
>
> Make sure there's a slash separating the path and the filename. Duh.
> ---
> dracut/fetch-kickstart-disk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dracut/fetch-kickstart-disk b/dracut/fetch-kickstart-disk
> index 3172049..d9ead33 100755
> --- a/dracut/fetch-kickstart-disk
> +++ b/dracut/fetch-kickstart-disk
> @@ -18,7 +18,7 @@ if [ -n "$mnt" ]; then
> else
> tmpmnt="$(mkuniqdir /run/install tmpmnt)"
> if mount -o ro $dev $tmpmnt; then
> - cp $tmpmnt$path /tmp/ks.cfg
> + cp $tmpmnt/$path /tmp/ks.cfg
> umount $tmpmnt
> rmdir $tmpmnt
> fi
This looks good to me. Is there a bug filed for this issue?
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list