summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-hooks')
-rwxr-xr-xconfig/chroot_local-hooks/00-sources.list7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/chroot_local-hooks/00-sources.list b/config/chroot_local-hooks/00-sources.list
index 49eaf04..976b539 100755
--- a/config/chroot_local-hooks/00-sources.list
+++ b/config/chroot_local-hooks/00-sources.list
@@ -1,5 +1,10 @@
#!/bin/sh
for file in /root/config/*; do [ -r $file ] && . $file; done
-sed -i -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|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
+ fi
+done
+sed -i -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" /etc/apt/sources.list