From 110498e5b8d75e00da37aebdf17609ec65053211 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 26 Mar 2010 20:51:35 +0100 Subject: [PATCH] First check if /etc/apt/sources.list exists, then grep it. If it doesn't exist enable security updates by default --- hooks/debian/20-setup-apt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/debian/20-setup-apt b/hooks/debian/20-setup-apt index aaec51a..8388ca3 100755 --- a/hooks/debian/20-setup-apt +++ b/hooks/debian/20-setup-apt @@ -78,7 +78,8 @@ E_O_APT # # If the host system has security support then enable that here too. # -if ( grep ^deb.*security /etc/apt/sources.list >/dev/null 2>/dev/null ) ; then +if ( test '!' -e /etc/apt/sources.list || \ + grep ^deb.*security /etc/apt/sources.list >/dev/null 2>/dev/null ) ; then cat <> ${prefix}/etc/apt/sources.list #