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
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
ficp $tmpmnt/$path /tmp/ks.cfg umount $tmpmnt rmdir $tmpmnt
This looks good to me. Is there a bug filed for this issue?
On Tue, 2013-09-17 at 08:14 +0200, Vratislav Podzimek wrote:
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
ficp $tmpmnt/$path /tmp/ks.cfg umount $tmpmnt rmdir $tmpmntThis looks good to me. Is there a bug filed for this issue?
Not that I know of; a bug reporter pointed it out to me while we were trying to trace a different problem, so I fixed it.
-w
anaconda-patches@lists.fedorahosted.org