1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# $Header: /home/cvsd/magellan-cvs/magellan-src/mlivecdbuild/mlivecdbuild.sh,v 1.6 2005-07-04 00:42:48 niro Exp $ |
3 |
|
|
4 |
# |
# |
5 |
# Builds Magellan Livecd's 0.3.6-r7 |
# Builds Magellan Livecd's 0.3.6-r7 |
9 |
source $rc_functions |
source $rc_functions |
10 |
|
|
11 |
### setup ### |
### setup ### |
12 |
export LIVECDROOT=/mnt/mlivecdbuild-0.3.6-r7 |
export LIVECDROOT=/mnt/mlivecdbuild |
13 |
export CDCHROOTDIR=${LIVECDROOT}/chroot |
export CDCHROOTDIR=${LIVECDROOT}/chroot |
14 |
export CDISOROOT=${LIVECDROOT}/isoroot |
export CDISOROOT=${LIVECDROOT}/isoroot |
15 |
export CDMAGEDIR=${LIVECDROOT}/files/mage-src |
export CDMAGEDIR=${LIVECDROOT}/files/mage-src |
145 |
## needed empty files (to prevent warnings only) |
## needed empty files (to prevent warnings only) |
146 |
touch ${CDCHROOTDIR}/etc/env.d/dummy || die |
touch ${CDCHROOTDIR}/etc/env.d/dummy || die |
147 |
touch ${CDCHROOTDIR}/etc/profile || die |
touch ${CDCHROOTDIR}/etc/profile || die |
148 |
|
mkdir -p ${CDCHROOTDIR}/etc/rc.d/init.d || die |
149 |
|
touch ${CDCHROOTDIR}/etc/rc.d/init.d/functions || die |
150 |
|
ln -snf /etc/rc.d/init.d ${CDCHROOTDIR}/etc/init.d || die |
151 |
|
|
152 |
if [ -n "${DIE}" ] |
if [ -n "${DIE}" ] |
153 |
then |
then |
467 |
evaluate_retval |
evaluate_retval |
468 |
fi |
fi |
469 |
|
|
470 |
#install modules |
# install modules |
471 |
install -d ${CDINITRD}/modules |
install -d ${CDINITRD}/modules |
472 |
source ${CDISOROOT}/isolinux/kernelversion |
source ${CDCHROOTDIR}/boot/kernelversion |
473 |
CDMODDIR=${CDCHROOTDIR}/lib/modules/${KRNLIB}/kernel |
CDMODDIR=${CDCHROOTDIR}/lib/modules/${KRNLIB}/kernel |
474 |
|
|
475 |
if [ -e ${CDLAYOUTDIR}/mods_scsi ] |
if [ -e ${CDLAYOUTDIR}/mods_scsi ] |
534 |
rm -f ${LIVECDROOT}/${CDISONAME} |
rm -f ${LIVECDROOT}/${CDISONAME} |
535 |
fi |
fi |
536 |
|
|
537 |
#fixes some issues with xfree/xorg xkb |
# fixes some issues with xfree/xorg xkb |
538 |
if [ -L "${CDCHROOTDIR}/etc/X11/xkb" -a -d "/usr/X11R6/lib/X11/xkb" ] |
if [ -L "${CDCHROOTDIR}/etc/X11/xkb" -a -d "/usr/X11R6/lib/X11/xkb" ] |
539 |
then |
then |
540 |
mecho fixing xkb symlink |
mecho fixing xkb symlink |
565 |
cat ${CDLAYOUTDIR}/issue > \ |
cat ${CDLAYOUTDIR}/issue > \ |
566 |
${CDCHROOTDIR}/etc/issue && \ |
${CDCHROOTDIR}/etc/issue && \ |
567 |
chmod 0644 ${CDCHROOTDIR}/etc/issue && \ |
chmod 0644 ${CDCHROOTDIR}/etc/issue && \ |
568 |
echo "HOSTNAME=\"${CDHOSTNAME}\"" > ${CDCHROOTDIR}/etc/hostname ) |
echo "${CDHOSTNAME}" > ${CDCHROOTDIR}/etc/hostname ) |
569 |
evaluate_retval |
evaluate_retval |
570 |
|
|
571 |
mecho Setting up services ... |
mecho Setting up services ... |
572 |
( cat >> ${CDCHROOTDIR}/root/.bashrc << "EOF" |
( cat >> ${CDCHROOTDIR}/root/.bashrc << "EOF" |
573 |
|
|
574 |
#change mountfs with mountfslivecd |
# change mountfs with mountfslivecd |
575 |
rc-config del mountfs |
rc-config del mountfs |
576 |
rc-config add mountfslivecd |
rc-config add mountfslivecd |
577 |
|
|
578 |
#add hardware detection |
# add hardware detection |
579 |
rc-config add hwdetect |
rc-config add hwdetect |
580 |
|
|
581 |
#del checkfs |
# del checkfs |
582 |
rc-config del checkfs |
rc-config del checkfs |
583 |
|
|
584 |
#exit |
#exit |
585 |
exit |
exit |
586 |
EOF |
EOF |
587 |
#run it |
# run it |
588 |
enter_chroot |
enter_chroot |
589 |
|
|
590 |
#clean up |
# clean up |
591 |
if [ -e ${CDCHROOTDIR}/root/.bashrc ] |
if [ -e ${CDCHROOTDIR}/root/.bashrc ] |
592 |
then |
then |
593 |
rm ${CDCHROOTDIR}/root/.bashrc |
rm ${CDCHROOTDIR}/root/.bashrc |
614 |
exit |
exit |
615 |
EOF |
EOF |
616 |
|
|
617 |
#run it |
# run it |
618 |
enter_chroot |
enter_chroot |
619 |
if [ -e ${CDCHROOTDIR}/root/.bashrc ] |
if [ -e ${CDCHROOTDIR}/root/.bashrc ] |
620 |
then |
then |