make_mirror.sh: only replace mini-httpd config in qcow image if HAVE_QEMU = yes
This commit is contained in:
parent
1b9348d97d
commit
49d0642932
1 changed files with 9 additions and 7 deletions
|
@ -361,16 +361,18 @@ END
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# now replace the minihttpd config with one that serves the new repository
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
# create a temporary directory because "copy-in" cannot rename the file
|
# now replace the minihttpd config with one that serves the new repository
|
||||||
tmpdir="$(mktemp -d)"
|
# create a temporary directory because "copy-in" cannot rename the file
|
||||||
cat << END > "$tmpdir/mini-httpd"
|
tmpdir="$(mktemp -d)"
|
||||||
|
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-unstable.qcow" -i copy-in "$tmpdir/mini-httpd" /etc/default
|
guestfish -a "$newcachedir/debian-unstable.qcow" -i copy-in "$tmpdir/mini-httpd" /etc/default
|
||||||
rm "$tmpdir/mini-httpd"
|
rm "$tmpdir/mini-httpd"
|
||||||
rmdir "$tmpdir"
|
rmdir "$tmpdir"
|
||||||
|
fi
|
||||||
|
|
||||||
# delete possibly leftover symlink
|
# delete possibly leftover symlink
|
||||||
if [ -e ./shared/cache.tmp ]; then
|
if [ -e ./shared/cache.tmp ]; then
|
||||||
|
|
Loading…
Reference in a new issue