diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:21 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:21 +0200 |
commit | c9462fd48b0d4fb9968641e46c3350fb5e9986a2 (patch) | |
tree | e14a49ee47996090c87a23c86d2e2c2ac877a70e /src/scripts | |
parent | fb35af8aa207ef5377022028d9e2b497445fb349 (diff) | |
download | vyos-live-build-c9462fd48b0d4fb9968641e46c3350fb5e9986a2.tar.gz vyos-live-build-c9462fd48b0d4fb9968641e46c3350fb5e9986a2.zip |
Adding live-package 0.99.4-1.
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/02defaults.sh | 4 | ||||
-rw-r--r-- | src/scripts/12patch.sh | 24 | ||||
-rw-r--r-- | src/scripts/13hack.sh | 19 | ||||
-rw-r--r-- | src/scripts/14chroot.sh (renamed from src/scripts/13chroot.sh) | 24 | ||||
-rw-r--r-- | src/scripts/21image.sh | 48 | ||||
-rw-r--r-- | src/scripts/22iso.sh | 6 | ||||
-rw-r--r-- | src/scripts/23net.sh | 8 |
7 files changed, 112 insertions, 21 deletions
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh index 9a0342da3..99a8d3b4a 100644 --- a/src/scripts/02defaults.sh +++ b/src/scripts/02defaults.sh @@ -136,13 +136,13 @@ Defaults () # Set debian mirror if [ -z "${LIVE_MIRROR}" ] then - LIVE_MIRROR="http://ftp.debian.org/debian" + LIVE_MIRROR="http://ftp.debian.org/debian/" fi # Set debian security mirror if [ -z "${LIVE_MIRROR_SECURITY}" ] then - LIVE_MIRROR_SECURITY="http://security.debian.org/debian" + LIVE_MIRROR_SECURITY="http://security.debian.org/" fi # Set debian sections diff --git a/src/scripts/12patch.sh b/src/scripts/12patch.sh index 16be344f1..873865c36 100644 --- a/src/scripts/12patch.sh +++ b/src/scripts/12patch.sh @@ -27,6 +27,30 @@ Patch_chroot () esac } +Patch_runlevel () +{ + # Disabling all init scripts with a blocking policy as in + # /usr/share/doc/sysv-rc/README.policy-rc.d.gz. + + case "${1}" in + apply) + # Create init policy + echo > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d <<EOF +#!/bin/sh + +exit 101 +EOF + + chmod 0755 "${LIVE_CHROOT}"/usr/sbin/policy-rc.d + ;; + + deapply) + # Removing init policy + rm -f "${LIVE_CHROOT}"/usr/sbin/policy-rc.d + ;; + esac +} + Patch_network () { # Packages which are manually installed inside the chroot are installed diff --git a/src/scripts/13hack.sh b/src/scripts/13hack.sh new file mode 100644 index 000000000..74bb5adcd --- /dev/null +++ b/src/scripts/13hack.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# make-live - utility to build Debian Live systems +# +# Copyright (C) 2006 Daniel Baumann <daniel@debian.org> +# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com> +# +# make-live comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. + +Hack_xorg () +{ + if [ -f "${LIVE_CHROOT}/etc/X11/xorg.conf" ] + then + # Comment "BusID" line and set driver to "vesa" + sed -i -e 's/\(^.*BusID.*\)/#\1/g' -e '/Section "Device"/,/EndSection/ s/\(.*Driver.*"\).*\(".*\)/\1vesa\2/g' "${LIVE_CHROOT}"/etc/X11/xorg.conf + fi +} diff --git a/src/scripts/13chroot.sh b/src/scripts/14chroot.sh index dd177dfb9..5f3ff9cd6 100644 --- a/src/scripts/13chroot.sh +++ b/src/scripts/14chroot.sh @@ -21,29 +21,13 @@ Chroot () then # Configure chroot Patch_chroot apply + #Patch_runlevel apply # Configure network Patch_network apply # Configure sources.list - echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list - - case "${LIVE_DISTRIBUTION}" in - "${CODENAME_TESTING}") - echo "deb ${LIVE_MIRROR} ${CODENAME_TESTING}-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_TESTING}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - ;; - - "${CODENAME_STABLE}") - echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_STABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - ;; - - "${CODENAME_OLDSTABLE}") - echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_OLDSTABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list - ;; - esac - - Chroot_exec "apt-get update" + Indices custom # Install secure apt if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ] @@ -92,6 +76,9 @@ Chroot () Chroot_exec "${LIVE_HOOK}" fi + # Temporary hacks for broken packages + Hack_xorg + # Clean apt packages cache rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/partial/*.deb @@ -106,6 +93,7 @@ Chroot () Patch_network deapply # Deconfigure chroot + #Patch_runlevel deapply Patch_chroot deapply # Touching stage file diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh index 51be0a106..0f483a6d3 100644 --- a/src/scripts/21image.sh +++ b/src/scripts/21image.sh @@ -9,6 +9,54 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. +Indices () +{ + case "${1}" in + default) + # Configure default sources.list + echo "deb http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + + case "${LIVE_DISTRIBUTION}" in + "${CODENAME_TESTING}") + echo "deb http://ftp.debian.org/debian/ ${CODENAME_TESTING}-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb http://security.debian.org/ ${CODENAME_TESTING}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + + "${CODENAME_STABLE}") + echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_STABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + + "${CODENAME_OLDSTABLE}") + echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_OLDSTABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + esac + ;; + + custom) + # Configure custom sources.list + echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + + case "${LIVE_DISTRIBUTION}" in + "${CODENAME_TESTING}") + echo "deb ${LIVE_MIRROR} ${CODENAME_TESTING}-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_TESTING}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + + "${CODENAME_STABLE}") + echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_STABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + + "${CODENAME_OLDSTABLE}") + echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_OLDSTABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + ;; + esac + ;; + esac + + # Update indices + Chroot_exec "apt-get update" +} + Md5sum () { # Calculating md5sums diff --git a/src/scripts/22iso.sh b/src/scripts/22iso.sh index bb67ef9b4..8f5b8c287 100644 --- a/src/scripts/22iso.sh +++ b/src/scripts/22iso.sh @@ -12,10 +12,16 @@ Iso () { mkdir -p "${LIVE_ROOT}"/image/casper + + # Switching package indices to default + Indices default # Generating rootfs image Genrootfs + # Switching package indices to custom + Indices custom + # Installing syslinux Syslinux iso diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh index 816d05aa7..144118363 100644 --- a/src/scripts/23net.sh +++ b/src/scripts/23net.sh @@ -29,10 +29,16 @@ NFSROOT=auto EOF Chroot_exec "update-initramfs -tu" fi + + # Switching package indices to default + Indices default - # Generating rootfs + # Generating rootfs image Genrootfs + # Switching package indices to custom + Indices custom + # Installing syslinux Syslinux net |