make_mirror.sh: feed file to guestfish via heredoc instead of tempfile
This commit is contained in:
parent
163da0a72d
commit
aaac3e677f
1 changed files with 3 additions and 6 deletions
|
@ -399,15 +399,12 @@ done
|
||||||
|
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
# now replace the minihttpd config with one that serves the new repository
|
# now replace the minihttpd config with one that serves the new repository
|
||||||
# create a temporary directory because "copy-in" cannot rename the file
|
guestfish -a "$newcachedir/debian-$DEFAULT_DIST.qcow" -i <<EOF
|
||||||
tmpdir="$(mktemp -d)"
|
upload -<<END /etc/default/mini-httpd
|
||||||
cat << END > "$tmpdir/mini-httpd"
|
|
||||||
START=1
|
START=1
|
||||||
DAEMON_OPTS="-h 127.0.0.1 -p 80 -u nobody -dd /mnt/cache -i /var/run/mini-httpd.pid -T UTF-8"
|
DAEMON_OPTS="-h 127.0.0.1 -p 80 -u nobody -dd /mnt/cache -i /var/run/mini-httpd.pid -T UTF-8"
|
||||||
END
|
END
|
||||||
guestfish -a "$newcachedir/debian-$DEFAULT_DIST.qcow" -i copy-in "$tmpdir/mini-httpd" /etc/default
|
EOF
|
||||||
rm "$tmpdir/mini-httpd"
|
|
||||||
rmdir "$tmpdir"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete possibly leftover symlink
|
# delete possibly leftover symlink
|
||||||
|
|
Loading…
Reference in a new issue