summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
commitd80c8552b60d499dbec7fb37e09ab8fc4145ce2d (patch)
tree34983c8c14a3316fbe7d34d564cbfebb73489ca3 /src/scripts
parent262e501463f4cc8bba690a1ef7cf0887cbfaa8cf (diff)
downloadvyos-live-build-d80c8552b60d499dbec7fb37e09ab8fc4145ce2d.tar.gz
vyos-live-build-d80c8552b60d499dbec7fb37e09ab8fc4145ce2d.zip
Adding live-package 0.99.6-1.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/02defaults.sh30
-rw-r--r--src/scripts/14chroot.sh16
-rw-r--r--src/scripts/21image.sh3
-rw-r--r--src/scripts/22iso.sh2
-rw-r--r--src/scripts/23net.sh4
5 files changed, 52 insertions, 3 deletions
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
index 78831e7ce..6e54c137b 100644
--- a/src/scripts/02defaults.sh
+++ b/src/scripts/02defaults.sh
@@ -31,6 +31,7 @@ Defaults ()
*)
echo "E: image type wrong or not yet supported."
+ Usage 1
;;
esac
else
@@ -53,6 +54,33 @@ Defaults ()
if [ -z "${LIVE_DISTRIBUTION}" ]
then
LIVE_DISTRIBUTION="unstable"
+ else
+ case "${LIVE_DISTRIBUTION}" in
+ "${CODENAME_OLDSTABLE}")
+ LIVE_DISTRIBUTION="oldstable"
+ ;;
+
+ "${CODENAME_STABLE}")
+ LIVE_DISTRIBUTION="stable"
+ ;;
+
+ "${CODENAME_TESTING}")
+ LIVE_DISTRIBUTION="testing"
+ ;;
+
+ "${CODENAME_UNSTABLE}")
+ LIVE_DISTRIBUTION="unstable"
+ ;;
+
+ experimental)
+ LIVE_DISTRIBUTION="unstable"
+ LIVE_DISTRIBUTION_EXPERIMENTAL="yes"
+ ;;
+
+ *)
+ LIVE_DISTRIBUTION="unstable"
+ ;;
+ esac
fi
# Set bootstrap flavour
@@ -128,7 +156,7 @@ Defaults ()
*)
echo "FIXME: Architecture not yet supported."
- exit 1
+ Usage 1
;;
esac
fi
diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 55ffa9a13..918e09a9e 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -13,6 +13,7 @@ Chroot_exec ()
{
# Execute commands chrooted
chroot "${LIVE_CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LIVE_PROXY_FTP}" http_proxy="${LIVE_PPROXY_HTTP}" DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" ${1}
+ return ${?}
}
Chroot ()
@@ -70,7 +71,11 @@ Chroot ()
fi
# Execute extra command in the chroot
- if [ -n "${LIVE_HOOK}" ]
+ if [ -r "${LIVE_HOOK}" ]
+ then
+ # FIXME
+ Chroot_exec "`cat ${LIVE_HOOK}`"
+ elif [ -n "${LIVE_HOOK}" ]
then
Chroot_exec "${LIVE_HOOK}"
fi
@@ -78,6 +83,15 @@ Chroot ()
# Temporary hacks for broken packages
Hack_xorg
+ # Add filesystem.manifest
+ Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest
+
+ if [ ! -z "${LIVE_MANIFEST}" ]
+ then
+ Chroot_exec "apt-get install --yes ${LIVE_MANIFEST}"
+ Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest-desktop
+ fi
+
# Clean apt packages cache
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/partial/*.deb
diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh
index 10c56e249..6357f0908 100644
--- a/src/scripts/21image.sh
+++ b/src/scripts/21image.sh
@@ -171,7 +171,8 @@ Syslinux ()
cp -r "${LIVE_TEMPLATES}"/syslinux/* \
"${LIVE_ROOT}"/tftpboot/pxelinux.cfg
mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default
- rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.*
+ rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg
+ sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt
# Configure syslinux templates
sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default
diff --git a/src/scripts/22iso.sh b/src/scripts/22iso.sh
index 07b1f9186..96ab7778b 100644
--- a/src/scripts/22iso.sh
+++ b/src/scripts/22iso.sh
@@ -14,6 +14,7 @@ Iso ()
if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
then
mkdir -p "${LIVE_ROOT}"/binary/casper
+ mv "${LIVE_ROOT}"/filesystem.manifest* "${LIVE_ROOT}"/binary/casper/
# Switching package indices to default
if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
@@ -43,6 +44,7 @@ Iso ()
if [ "${LIVE_FLAVOUR}" != "minimal" ]
then
cp -r "${LIVE_TEMPLATES}"/iso/* "${LIVE_ROOT}"/binary
+ cp -r "${LIVE_TEMPLATES}"/common/* "${LIVE_ROOT}"/binary
fi
# Calculating md5sums
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
index 563420b2e..0b571efd5 100644
--- a/src/scripts/23net.sh
+++ b/src/scripts/23net.sh
@@ -13,6 +13,10 @@ Net ()
{
if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
then
+ mkdir -p "${LIVE_ROOT}"/binary/casper
+ cp -r "${LIVE_TEMPLATES}"/common/* "${LIVE_ROOT}"/binary
+ mv "${LIVE_ROOT}"/filesystem.manifest* "${LIVE_ROOT}"/binary/casper
+
# Installing smbfs
Chroot_exec "apt-get install --yes smbfs"