[PATCH] Adding netrc to generate auth.conf
Signed-off-by: Anthony F. McInerney <afm404@gmail.com>
---
debian/apt-setup-udeb.templates | 7 +++++++
generators/60local | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/debian/apt-setup-udeb.templates b/debian/apt-setup-udeb.templates
index 7b7afcf..fdfb3d8 100644
--- a/debian/apt-setup-udeb.templates
+++ b/debian/apt-setup-udeb.templates
@@ -112,3 +112,10 @@ Description: for internal use; can be preseeded
without using 'dpkg --force-architecture', in addition to the native
architecture. If empty, only allow installing packages from the native
architecture.
+
+Template: apt-setup/local/netrc
+Type: string
+Description: for http apt repositories that require authentication
+does not pull apt/localx/repostory as machine due to possible parse mangle
+format as man netrc suggests
+example: machine packages.server.org login myuser password mypass
diff --git a/generators/60local b/generators/60local
index fcd4f1c..ade16f2 100755
--- a/generators/60local
+++ b/generators/60local
@@ -51,6 +51,13 @@ while db_get "apt-setup/local$i/repository" && [ "$RET" ]; do
fi
done
fi
+ netrc=
+ if db_get "apt-setup/local$i/netrc"; then
+ netrc="$RET"
+ fi
+ if [ -n "$netrc" ]; then
+ echo "$netrc">> $ROOT/etc/apt/auth.conf
+ fi
i="$(($i + 1))"
done
--
2.0.0.rc0
Reply to: