From: Enrico Scholz Date: Fri, 26 Dec 2003 00:33:40 +0000 (+0000) Subject: fixed initVariablesApt() X-Git-Tag: VERSION_0_10~1031 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfe1b38c6188bf170e9268de16713b956ad0d738;hp=05a57e83b574b0541c779774bdf4f43d2aacf0a0;p=util-vserver.git fixed initVariablesApt() added support for default apt.conf git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@484 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver-build.functions.apt b/util-vserver/scripts/vserver-build.functions.apt index ce86246..30774e6 100644 --- a/util-vserver/scripts/vserver-build.functions.apt +++ b/util-vserver/scripts/vserver-build.functions.apt @@ -42,7 +42,6 @@ function installBasePackages function initVariablesApt { - : } function initFilesystemApt @@ -50,6 +49,14 @@ function initFilesystemApt mkdir -p "$PKGCFGDIR"/apt/{etc,archives/partial,cache,state/lists/partial} populateDirectory "$PKGCFGDIR/apt/etc" \ + "$DISTRIBDIR/defaults/apt" \ "$DISTRIBDIR/$DISTRIBUTION/apt" \ "$CONFDIR/.distributions/$DISTRIBUTION/apt" + + local f="$PKGCFGDIR"/apt/etc/apt.conf + if test -e "$f"; then + sed -e "s!@APTETCDIR@!$PKGCFGDIR/apt/etc!g" "$f" >"$f.tmp" + cmp -s "$f" "$f.tmp" || cat "$f.tmp" >"$f" + rm -f "$f.tmp" + fi }