diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:46 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:14:51 +0100 |
commit | fe6eb1c593e2df135c8807bf94df614984b4d6ec (patch) | |
tree | 693b803dcc6473a8699f0c605c92b10c24755e28 /helpers/lh_setupapt | |
parent | 470cf1764bf56b32addff591cfe3fd69af0e5760 (diff) | |
download | vyos-live-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.tar.gz vyos-live-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.zip |
Adding live-helper 1.0~a1-1.
Diffstat (limited to 'helpers/lh_setupapt')
-rwxr-xr-x | helpers/lh_setupapt | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/helpers/lh_setupapt b/helpers/lh_setupapt deleted file mode 100755 index 37a3dbdfa..000000000 --- a/helpers/lh_setupapt +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/sh - -case "${1}" in - custom) - # Configure custom sources.list - case "${LIVE_DISTRIBUTION}" in - stable|"${CODENAME_STABLE}"|testing|"${CODENAME_TESTING}") - echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - - echo "deb ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - ;; - - unstable|"${CODENAME_UNSTABLE}") - echo "deb ${LIVE_MIRROR} unstable ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src ${LIVE_MIRROR} unstable ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - - if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ] - then - echo "deb ${LIVE_MIRROR} experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src ${LIVE_MIRROR} experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - -cat > "${LIVE_CHROOT}"/etc/apt/preferences << EOF -Package: * -Pin: release a=experimental -Pin-Priority: 999 -EOF - fi - ;; - esac - ;; - - default) - # Configure default sources.list - case "${LIVE_DISTRIBUTION}" in - oldstable|"${CODENAME_OLDSTABLE}"|stable|"${CODENAME_STABLE}"|testing|"${CODENAME_TESTING}") - echo "deb http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - - echo "deb http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - ;; - - unstable|"${CODENAME_UNSTABLE}") - echo "deb http://ftp.debian.org/debian/ unstable ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src http://ftp.debian.org/debian/ unstable ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - - if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ] - then - echo "deb http://ftp.debian.org/debian/ experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - - if [ "${LIVE_SOURCE}" = "yes" ] - then - echo "deb-src http://ftp.debian.org/debian/ experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - fi - fi - ;; - esac - ;; -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 -if [ "${2}" = "initial" ] -then - lh_chroot "apt-get update" -else - lh_chroot "aptitude update" -fi - -if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ] -then - # experimental is sometimes broken, - # therefore this is intentionally kept interactive. - lh_chroot "aptitude upgrade" || return 0 - lh_chroot "aptitude dist-upgrade" || return 0 -fi |