[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#515298: allow preseeding of security directory



Package: apt-setup
Severity: wishlist
Tags: patch

This patch makes it possible to preseed the security directory, so that it can
be something other than / (useful in combination with apt-setup/security_host).

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Index: generators/91security
===================================================================
--- generators/91security	(revision 56524)
+++ generators/91security	(working copy)
@@ -14,6 +14,12 @@
 host="$RET"
 [ "$host" ] || exit
 
+if db_get apt-setup/security_directory && [ "$RET" ]; then
+	directory="$RET"
+else
+	directory="/"
+fi
+
 if ! db_get mirror/codename || [ -z "$RET" ]; then
 	db_get cdrom/codename
 fi
@@ -29,7 +35,7 @@
 done
 
 # Don't test mirror if no network selected in netcfg
-echo "deb http://$host/ $codename/updates $dists" >> $file
+echo "deb http://$host$directory $codename/updates $dists" >> $file
 if db_get netcfg/dhcp_options && \
    [ "$RET" = "Do not configure the network at this time" ]; then
 	CODE=9
@@ -46,6 +52,6 @@
 	fi
 fi
 
-echo "deb-src http://$host/ $codename/updates $dists" >> $file
+echo "deb-src http://$host$directory $codename/updates $dists" >> $file
 
 exit $CODE

Reply to: