summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks/xx-sources.list
blob: 5d1616ef2b3ea0cd1d3b5344f5e8d1bc8040dd42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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

# update apt index debpool
cp -f /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i '/live/!d' /etc/apt/sources.list
apt-get update
cp -f /etc/apt/sources.list.bak /etc/apt/sources.list
rm -f /etc/apt/sources.list.bak