3 # Copyright (C) 2009-2010 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 # Turn excludelist file into command line arguments.
25 while read regexp <&5; do
26 excludes="$excludes --exclude $regexp"
30 # Run febootstrap on the package list.
31 if [ "x@FEBOOTSTRAP_YUM_CONFIG@" != "xno" ]; then
32 extra="--yum-config @FEBOOTSTRAP_YUM_CONFIG@"
35 echo @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
36 @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
38 # Remove some things that we don't want in the appliance. This is
39 # copied from the old febootstrap-minimize. However minimization is
40 # not so important now that we are caching the appliance.
41 < supermin.d/hostfiles \
42 grep -v '^/usr/lib/locale' |
43 grep -v '^/usr/share/locale' |
44 grep -v '^/usr/lib/gconv' |
45 grep -v '^/usr/lib64/gconv' |
46 grep -v '^/usr/bin/localedef' |
47 grep -v '^/usr/sbin/build-locale-archive' |
48 grep -v '^/usr/share/man/' |
49 grep -v '^/usr/share/doc/' |
50 grep -v '^/usr/share/info/' |
51 grep -v '^/usr/share/gnome/help/' |
52 grep -v '^/usr/share/cracklib/' |
53 grep -v '^/usr/share/i18n/' > supermin.d/hostfiles-t
55 # XXX resolv.conf? The old script had:
56 # echo nameserver 169.254.2.3 > resolv.conf
57 if ! grep -q /etc/resolv.conf supermin.d/hostfiles-t; then
58 echo /etc/resolv.conf >> supermin.d/hostfiles-t
61 # Include any Augeas lenses from the host.
62 if grep -q /usr/share/augeas/lenses supermin.d/hostfiles-t; then
63 echo "/usr/share/augeas/lenses/*.aug" >> supermin.d/hostfiles-t
66 mv supermin.d/hostfiles-t supermin.d/hostfiles