2013-01-25 08:06:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-01-30 14:35:00 +00:00
|
|
|
if ! [ -f "${INSTALLDIR}/tmp/.prepared_base" ]; then
|
|
|
|
echo "-> Initializing RPM database..."
|
|
|
|
rpm --initdb --root=$INSTALLDIR
|
|
|
|
rpm --import --root=$INSTALLDIR $SCRIPTSDIR/keys/*
|
2013-01-25 08:06:20 +00:00
|
|
|
|
2015-02-14 17:45:00 +00:00
|
|
|
if [ "$DIST" == "fc21" ]; then
|
|
|
|
echo "-> Retreiving core RPM packages..."
|
|
|
|
INITIAL_PACKAGES="filesystem setup fedora-release"
|
|
|
|
yum --disablerepo=\* --enablerepo=fedora -y --installroot="${INSTALLDIR}" --releasever=${DIST/fc/} install --downloadonly --downloaddir="$SCRIPTSDIR/base_rpms_${DIST}" ${INITIAL_PACKAGES}
|
|
|
|
fi
|
|
|
|
|
2015-01-30 14:35:00 +00:00
|
|
|
echo "-> Installing core RPM packages..."
|
|
|
|
rpm -i --root=$INSTALLDIR $SCRIPTSDIR/base_rpms/*.rpm || exit 1
|
|
|
|
|
|
|
|
touch "${INSTALLDIR}/tmp/.prepared_base"
|
|
|
|
fi
|
2013-01-25 08:06:20 +00:00
|
|
|
|
2013-02-16 16:08:27 +00:00
|
|
|
cp $SCRIPTSDIR/resolv.conf $INSTALLDIR/etc
|
|
|
|
cp $SCRIPTSDIR/network $INSTALLDIR/etc/sysconfig
|
2013-01-25 08:06:20 +00:00
|
|
|
cp -a /dev/null /dev/zero /dev/random /dev/urandom $INSTALLDIR/dev/
|