185 |
mage update || die "update mage-tree" |
mage update || die "update mage-tree" |
186 |
|
|
187 |
# now get the toolchain and the basesystem layout file |
# now get the toolchain and the basesystem layout file |
188 |
[ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |
# [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |
189 |
[ -z "${BASESYSTEM}" ] && BASESYSTEM="basesystem.defaults" |
# [ -z "${BASESYSTEM}" ] && BASESYSTEM="basesystem.defaults" |
190 |
# read them |
# # read them |
191 |
TOOLCHAIN="$(< /etc/mage-profile/${TOOLCHAIN})" |
# TOOLCHAIN="$(< /etc/mage-profile/${TOOLCHAIN})" |
192 |
BASESYSTEM="$(< /etc/mage-profile/${BASESYSTEM})" |
# BASESYSTEM="$(< /etc/mage-profile/${BASESYSTEM})" |
193 |
|
|
194 |
|
# this way toolchain and basesytem can be packages; |
195 |
|
# only if nothing set the layout files from the profile will be taken |
196 |
|
[ -z "${TOOLCHAIN}" ] && TOOLCHAIN="$(< /etc/mage-profile/toolchain.defaults)" |
197 |
|
[ -z "${BASESYSTEM}" ] && BASESYSTEM="$(< /etc/mage-profile/basesystem.defaults)" |
198 |
|
|
199 |
# install toolchain |
# install toolchain |
200 |
CONFIG_PROTECT="-*" MROOT="${MROOT}" mage install ${TOOLCHAIN} || die "toolchain install" |
CONFIG_PROTECT="-*" MROOT="${MROOT}" mage install ${TOOLCHAIN} || die "toolchain install" |
206 |
install -m 0644 ${MAGERC} ${MROOT}/etc/mage.rc || die "install mage.rc" |
install -m 0644 ${MAGERC} ${MROOT}/etc/mage.rc || die "install mage.rc" |
207 |
install -m 0644 /etc/resolv.conf ${MROOT}/etc/resolv.conf || die "install resolv.conf" |
install -m 0644 /etc/resolv.conf ${MROOT}/etc/resolv.conf || die "install resolv.conf" |
208 |
|
|
209 |
|
# abort if wanted |
210 |
|
if [[ ${ABORT_AFTER_STAGE1} = true ]] |
211 |
|
then |
212 |
|
echo "Stage1 complete; user requested to abort after this step." |
213 |
|
echo "Exiting ..." |
214 |
|
exit 0 |
215 |
|
fi |
216 |
|
|
217 |
# now create an initrc for the installation of the basesystem |
# now create an initrc for the installation of the basesystem |
218 |
:> ${MROOT}/.installrc |
:> ${MROOT}/.installrc |
219 |
add_initrc "export HOME=/root" |
add_initrc "export HOME=/root" |