summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:23 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:23 +0200
commitfe7102be0cfa4b23ac583055dfdfc6241fd61179 (patch)
treec0c6a227fe360e30dc3cb6042d9180330994e238 /src/scripts
parent873a8ac3d1221f47f695c8d89a63370296afffda (diff)
downloadvyos-live-build-fe7102be0cfa4b23ac583055dfdfc6241fd61179.tar.gz
vyos-live-build-fe7102be0cfa4b23ac583055dfdfc6241fd61179.zip
Adding live-package 0.99.9-1.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/11bootstrap.sh11
-rw-r--r--src/scripts/14chroot.sh16
-rw-r--r--src/scripts/21image.sh20
3 files changed, 47 insertions, 0 deletions
diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh
index f0a671563..f2f6c0ae7 100644
--- a/src/scripts/11bootstrap.sh
+++ b/src/scripts/11bootstrap.sh
@@ -13,6 +13,17 @@ Bootstrap ()
{
if [ ! -f "${LIVE_ROOT}"/.stage/bootstrap ]
then
+ # Use proxy
+ if [ -n "${LIVE_PROXY_FTP}" ] && [ -z "${ftp_proxy}" ]
+ then
+ export ftp_proxy="${LIVE_PROXY_FTP}"
+ fi
+
+ if [ -n "${LIVE_PROXY_HTTP}" ] && [ -z "${http_proxy}" ]
+ then
+ export http_proxy="${LIVE_PROXY_HTTP}"
+ fi
+
# Create chroot directory
if [ ! -d "${LIVE_CHROOT}" ]
then
diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 356c1a2ec..e264128e0 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -36,6 +36,22 @@ Chroot ()
if [ "${LIVE_FLAVOUR}" != "minimal" ]
then
Chroot_exec "apt-get install --yes --force-yes debian-archive-keyring"
+
+ for NAME in ${LIVE_REPOSITORIES}
+ do
+ eval REPOSITORY_KEY="$`echo LIVE_REPOSITORY_KEY_$NAME`"
+ eval REPOSITORY_KEYRING="$`echo LIVE_REPOSITORY_KEYRING_$NAME`"
+
+ if [ -n "${REPOSITORY_KEYRING}" ]
+ then
+ Chroot_exec "apt-get install ${REPOSITORY_KEYRING}"
+ elif [ -n "${REPOSITORY_KEY}" ]
+ then
+ Chroot_exec "wget ${REPOSITORY_KEY}"
+ Chroot_exec "apt-key add `basename ${REPOSITORY_KEY}`"
+ Chroot_exec "rm -f `basename ${REPOSITORY_KEY}`"
+ fi
+ done
fi
fi
diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh
index 7258b6af1..1bab3e1fa 100644
--- a/src/scripts/21image.sh
+++ b/src/scripts/21image.sh
@@ -93,6 +93,25 @@ EOF
;;
esac
+ # Add custom repositories
+ echo "" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ echo "# Custom repositories" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+
+ for NAME in ${LIVE_REPOSITORIES}
+ do
+ eval REPOSITORY="$`echo LIVE_REPOSITORY_$NAME`"
+ eval REPOSITORY_DISTRIBUTION="$`echo LIVE_REPOSITORY_DISTRIBUTION_$NAME`"
+ eval REPOSITORY_SECTIONS="$`echo LIVE_REPOSITORY_SECTIONS_$NAME`"
+
+ # Configure /etc/apt/sources.list
+ if [ -n "${REPOSITORY_DISTRIBUTION}" ]
+ then
+ echo "deb ${REPOSITORY} ${REPOSITORY_DISTRIBUTION} ${REPOSITORY_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ else
+ echo "deb ${REPOSITORY} ${LIVE_DISTRIBUTION} ${REPOSITORY_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ fi
+ done
+
# Update indices
Chroot_exec "apt-get update"
@@ -192,6 +211,7 @@ Linuximage ()
then
mv "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/binary/isolinux/vmlinuz
mv "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/binary/isolinux/initrd.gz
+ rm -f "${LIVE_CHROOT}"/vmlinuz "${LIVE_CHROOT}"/initrd.img
else
cp "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/binary/isolinux/vmlinuz
cp "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/binary/isolinux/initrd.gz