summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks
diff options
context:
space:
mode:
authorHolger Paradies <retabell@gmx.de>2021-03-29 18:40:39 +0200
committerHolger Paradies <retabell@gmx.de>2021-03-31 19:48:52 +0200
commit6e88277b0b9b45bb82c5c64e6c3b3f1682691443 (patch)
tree86d7477f42e7a42d20cbe60e3d2065c40aaf3632 /config/chroot_local-hooks
parentf42c9a2eef6b1925381958e58f0afb3a52e10efd (diff)
downloadkanotix-6e88277b0b9b45bb82c5c64e6c3b3f1682691443.zip
kanotix-6e88277b0b9b45bb82c5c64e6c3b3f1682691443.tar.gz
Use deb.debian.org in final iso
It is possible to use any desired mirror for all task and ends with deb.debian.org.
Diffstat (limited to 'config/chroot_local-hooks')
-rwxr-xr-xconfig/chroot_local-hooks/00-sources.list6
-rwxr-xr-xconfig/chroot_local-hooks/xx-sources.list12
2 files changed, 17 insertions, 1 deletions
diff --git a/config/chroot_local-hooks/00-sources.list b/config/chroot_local-hooks/00-sources.list
index 880e38a..d81ce7c 100755
--- a/config/chroot_local-hooks/00-sources.list
+++ b/config/chroot_local-hooks/00-sources.list
@@ -1,6 +1,10 @@
#!/bin/sh
for file in /root/config/*; do [ -r $file ] && . $file; done
+echo "Info: mirror is ${LB_MIRROR_CHROOT} or ${LB_PARENT_MIRROR_CHROOT}"
+
+sed -i -e "s#@MIRRORDUMMY@#${LB_MIRROR_CHROOT}#"g /etc/apt/sources.list
+
for x in /etc/apt/sources.list.d/*.list; do
if grep -q '### THIS FILE IS AUTOMATICALLY CONFIGURED ###' $x; then
rm -f $x
@@ -24,5 +28,5 @@ esac
# fix for archive
if [ "$LB_DISTRIBUTION" = "wheezy" ]; then
- sed -i -e "s|ftp.de.debian.org/debian wheezy|archive.debian.org/debian wheezy|g" /etc/apt/sources.list
+ sed -i -e "s#${LB_MIRROR_CHROOT}#http://archive.debian.org/debian#g" /etc/apt/sources.list
fi
diff --git a/config/chroot_local-hooks/xx-sources.list b/config/chroot_local-hooks/xx-sources.list
new file mode 100755
index 0000000..9ea083f
--- /dev/null
+++ b/config/chroot_local-hooks/xx-sources.list
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+for file in /root/config/*; do [ -r $file ] && . $file; done
+
+echo "Info: mirror is ${LB_MIRROR_CHROOT} or ${LB_PARENT_MIRROR_CHROOT}"
+
+# end up with deb.debian.org in final iso since stretch
+case "${LB_DISTRIBUTION}" in
+ wheezy|jessie) exit ;;
+esac
+
+sed -i -e "s#${LB_MIRROR_CHROOT}#http://deb.debian.org/debian#"g /etc/apt/sources.list