From 4a7642d7047675da9c1a9b3a2b8fb9fcbbbaebf7 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Sat, 6 Jan 2007 21:33:17 +0000 Subject: Add slxbootstrap used by busybox. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@589 95ad53e4-c205-0410-b2fa-d234c58c8868 --- Makefile | 2 +- installer/slxbootstrap | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100755 installer/slxbootstrap diff --git a/Makefile b/Makefile index c9c790b7..c32d3449 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ supported."; \ tar -xp -C $(SLX_SHARE_PATH) @cd theming; tar --exclude=.svn -cp * | \ tar -xp -C $(SLX_SHARE_PATH)/themes; cd .. - @cp tools/busybox $(SLX_SHARE_PATH)/busybox + @cp -p tools/busybox installer/slxbootstrap $(SLX_SHARE_PATH)/busybox/ @# create pre-/postinit scripts for us in initramfs: @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \ diff --git a/installer/slxbootstrap b/installer/slxbootstrap new file mode 100755 index 00000000..81a7e2b6 --- /dev/null +++ b/installer/slxbootstrap @@ -0,0 +1,66 @@ +#! /bin/ash + +PATH="/bin:/sbin:/usr/bin:/usr/sbin" + +: ${SLX_BOOTSTRAP_PATH:="/slxbootstrap"} +: ${SLX_STAGE1_FINAL_PATH:="/slxfinal"} + +test -f /etc/slxbootstrap.conf +. /etc/slxbootstrap.conf + +for dir in / ${SLX_BOOTSTRAP_PATH}/${SLX_STAGE1_FINAL_PATH}; do + test -d "${dir}/dev" || \ + mkdir -p "${dir}/dev" + mknod "${dir}/dev/null" c 1 3 +done + +test -d /etc/prereqfiles && \ + cp -pr /etc/prereqfiles/* "${SLX_BOOTSTRAP_PATH}/${SLX_STAGE1_FINAL_PATH}/" + +test -d "${SLX_BOOTSTRAP_PATH}" || \ + mkdir -p "${SLX_BOOTSTRAP_PATH}" +cd "${SLX_BOOTSTRAP_PATH}" + +for file in ${SLX_BASE_PREREQ_PACKAGES}; do + wget "${SLX_INST_SOURCE_BASEURL}${SLX_INST_SOURCE_PACKAGE_SUBDIR:+/${SLX_INST_SOURCE_PACKAGE_SUBDIR}}/${file}" + if test $? != 0; then + echo "Error: Unable to download ${SLX_INST_SOURCE_BASEURL}/${file}" + exit 1 + fi + case "${file}" in + *.deb) + ar x "${file##*/}" + if test $? != 0; then + echo "Error: Unable to unpack archive ${file##*/}" + exit 1 + fi + tar xzf data.tar.gz + rm -f debian-binary *.tar.gz + ;; + *.rpm) + rpm2cpio "${file##*/}" | \ + cpio -i -d +# Enable error check as soon as busybox 1.3.1 is used. +# if test $? != 0; then +# echo "Error: Unable to rpm2cpio | cpio $file" +# exit 1 +# fi + ;; + esac +done + +for file in ${SLX_BASE_BOOTSTRAP_PACKAGES}; do + wget "${SLX_INST_SOURCE_BASEURL}${SLX_INST_SOURCE_PACKAGE_SUBDIR:+/${SLX_INST_SOURCE_PACKAGE_SUBDIR}}/${file}" + if test $? != 0; then + echo "Error: Unable to download ${SLX_INST_SOURCE_BASEURL}/${file}" + exit 1 + fi +done + +for file in ${SLX_INST_SOURCE_PACKAGEKEYS}; do + wget "${SLX_INST_SOURCE_BASEURL}/${file}" + if test $? != 0; then + echo "Error: Unable to download ${SLX_INST_SOURCE_BASEURL}/${file}" + exit 1 + fi +done -- cgit v1.2.3-55-g7522