[Debian-NP-Commits] r260 - people/vagrant/simple-cdd
Vagrant Cascadian
debian-np-devel@lists.alioth.debian.org
Thu, 25 Nov 2004 23:45:11 -0700
Author: vagrant-guest
Date: Thu Nov 25 23:45:00 2004
New Revision: 260
Modified:
people/vagrant/simple-cdd/CONF.sh
people/vagrant/simple-cdd/simple-cdd-profiles
Log:
move profile selection to the very top, fall-back to installing packages one at a time if wholesale package install fails.
Modified: people/vagrant/simple-cdd/CONF.sh
==============================================================================
--- people/vagrant/simple-cdd/CONF.sh (original)
+++ people/vagrant/simple-cdd/CONF.sh Thu Nov 25 23:45:00 2004
@@ -3,6 +3,21 @@
# variables in lowercase are only used by simple-cdd.
+# profile selection
+
+# the following three files get included on the CD if present:
+# $profile.preseed debconf selections
+# $profile.packages packages to be installed with the profile
+# $profile.downloads additional packages to be included on the CD with this
+# profile, but not installed by default.
+
+# during the initial boot of the system, it will give you the options to
+# determine which profiles you want to install.
+
+# profiles to include on the CD:
+profiles="default"
+#profiles="default lessdisks"
+
# path to simple-cdd files
simple_cdd_dir=$(pwd)
@@ -40,11 +55,6 @@
# list of packages to mirror
all_packages=""
-# profiles to include. must have a $profilename.preseed and/or
-# $profilename.packages file in $simple_cdd_dir
-profiles="default"
-#profiles="default lessdisks"
-
## debpartial-mirror values ##
# use a proxy (FIXME: does debpartial-mirror pay attention to proxy?)
Modified: people/vagrant/simple-cdd/simple-cdd-profiles
==============================================================================
--- people/vagrant/simple-cdd/simple-cdd-profiles (original)
+++ people/vagrant/simple-cdd/simple-cdd-profiles Thu Nov 25 23:45:00 2004
@@ -7,7 +7,7 @@
# load debconf
. /usr/share/debconf/confmodule
-db_input high simple-cdd/profiles
+db_input high simple-cdd/profiles || /bin/true
db_go
db_get simple-cdd/profiles || /bin/true
@@ -15,13 +15,20 @@
db_stop
for p in $profiles ; do
- echo "configuring $p"
+ echo "Setting up profile: $p"
if [ -r "$p.preseed" ]; then
echo "debconf preseeding for $p"
debconf-set-selections $p.preseed
fi
if [ -r "$p.packages" ]; then
- echo "installing packages for $p"
- apt-get -yu install "$(egrep -v ^# $p.packages)"
+ echo "Installing packages for $p"
+ packages="$(egrep -v ^# $p.packages)"
+ apt-get -yu install $packages
+ if [ "0" != "$?" ]; then
+ echo "Problems encountered for $p, installing packages one at a time..."
+ for a in $packages ; do
+ apt-get -yu install $a
+ done
+ fi
fi
done