From 96c8039c0d382169d57062fdcc58807a4e24755b Mon Sep 17 00:00:00 2001 From: fake Date: Tue, 4 Jul 2006 19:19:13 +0000 Subject: [PATCH] fake: stone_mod_packages.sh: also try to guess the CONFIG_ID of the distro to be in- stalled via network (http). better than trying to install the bootcd... [2006061314145125709] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7691 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/sysfiles/stone_mod_packages.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/base/sysfiles/stone_mod_packages.sh b/package/base/sysfiles/stone_mod_packages.sh index 62a27123a..2e0e0fcf4 100644 --- a/package/base/sysfiles/stone_mod_packages.sh +++ b/package/base/sysfiles/stone_mod_packages.sh @@ -37,6 +37,14 @@ elif [ -n "$ROCK_INSTALL_SOURCE_URL" ] ; then ROCKCFG_SHORTID="$( grep '^export ROCKCFG_SHORTID=' \ /etc/ROCK-CONFIG/config 2> /dev/null | cut -f2- -d= )" ROCKCFG_SHORTID="${ROCKCFG_SHORTID//\'/}" + + tmpfile=`mktemp` + if wget -q -O "$tmpfile" "${ROCK_INSTALL_SOURCE_URL}/index.txt" ; then + ROCKCFG_SHORTID=`grep -v "${ROCKCFG_SHORTID}" $tmpfile | \ + grep '/pkgs/' | head -n 1 | \ + cut -f2 -d' ' | cut -f1 -d/` + fi ; + rm -f $tmpfile else dev="/dev/cdroms/cdrom0" dir="/mnt/cdrom" ; root="/"