Commit 71fa8ea4 authored by Alessandro Elias's avatar Alessandro Elias
Browse files

Many modifications to make work.


Signed-off-by: Alessandro Elias's avatarAlessandro Elias <ae11@c3sl.ufpr.br>
parent 73053006
......@@ -20,34 +20,31 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
type addToChrootFile >/dev/null 2>&1 || . common.sh
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
#DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
PREFIX=$PWD
source ${PREFIX}/common.sh
#INSTLIST=$6
#ISOLINUX=$7
#MOUNTLIST=$8
#OURSOURCESLIST=$9
#RMDSKT=${10}
#RMLIST=${11}
#SCRIPTSDIR=${12}
#SHORTNAME=${13}
#SOURCESLISTDEFAULT=${14}
#TMP=${15}
LOG_FILE=${16}
#PREFIX=$PWD
cat ${DPLIST} | grep -v '^#' | tr '\n' ''
addToChrootFile $CHROOTFILE "env PATH='/fakebin:${PATH}'"
addToChrootFile $CHROOTFILE "export DEBIAN_FRONTEND=noninteractive"
addToChrootFile $CHROOTFILE "apt-get update && apt-get -q -y install $(cat ${DPLIST} | grep -v '^#' | tr '\n' ' ')"
initChroot $_DIST || \
log ERROR "failed to initialize chroot."
execChroot $CHROOTFILE $CHROOTDIR
RET=$?
closeChroot || \
log ERROR "failed to close chroot."
addToChrootFile $CHROOTDIR "export PATH='/fakebin:${PATH}'"
addToChrootFile $CHROOTDIR "export DEBIAN_FRONTEND=noninteractive"
addToChrootFile $CHROOTDIR "apt-get update && apt-get --quiet --assume-yes install $(cat ${DPLIST} | grep --invert-match '^#')"
#initChroot $CHROOTDIR $LOG_FILE || log ERROR "failed to initialize chroot."
#execChroot $CHROOTDIR
#closeChroot $CHROOTDIR $LOG_FILE || log ERROR "failed to close chroot."
exit $?
exit 0
......@@ -39,9 +39,9 @@ PREFIX=$PWD
source ${PREFIX}/common.sh
addToChrootFile $CHROOTFILE "env PATH='/fakebin:${PATH}'"
addToChrootFile $CHROOTFILE "export DEBIAN_FRONTEND=noninteractive"
addToChrootFile $CHROOTFILE "apt-get update && apt-get -q -y -t testing install le-live-all"
addToChrootFile $CHROOTFILE "apt-get update && apt-get -q -y -t testing install $(cat ${INSTLIST} | grep -v '^#' | tr '\n' ' ')"
addToChrootFile $CHROOTDIR "export PATH='/fakebin:${PATH}'"
addToChrootFile $CHROOTDIR "export DEBIAN_FRONTEND=noninteractive"
addToChrootFile $CHROOTDIR "apt-get update && apt-get -q -y -t testing install le-live-all"
addToChrootFile $CHROOTDIR "apt-get update && apt-get -q -y -t testing install $(cat ${INSTLIST} | grep -v '^#')"
exit 0
......@@ -39,7 +39,7 @@ PREFIX=$PWD
source ${PREFIX}/common.sh
cp ${CHROOTDIR}/boot/vmlinuz-*-generic ${TMP}/image/casper/vmlinuz || exit 1
#cp ${CHROOTDIR}/boot/vmlinuz-*-generic ${TMP}/image/casper/vmlinuz || exit 1
if [ ! -d ${PREFIX}/initrd ]; then
mkdir ${PREFIX}/initrd
else
......
......@@ -39,7 +39,7 @@ PREFIX=$PWD
source ${PREFIX}/common.sh
addToChrootFile $CHROOTFILE "apt-get -y purge $(cat ${RMLIST} | grep -v "^#" | tr '\n' ' ')"
addToChrootFile $CHROOTFILE "apt-get -y autoremove"
addToChrootFile $CHROOTDIR "apt-get -y purge $(cat ${RMLIST} | grep -v "^#")"
addToChrootFile $CHROOTDIR "apt-get -y autoremove"
exit 0
......@@ -37,22 +37,23 @@ SOURCESLISTDEFAULT=${14}
TMP=${15}
PREFIX=$PWD
set -x
echo "TMP = ${TMP}"
mkdir -p ${TMP}/image/{casper,isolinux,install} || exit 1
#cp initrd.lz ${TMP}/image/casper/initrd.lz || exit 1
cp -r src/pool ${TMP}/image/ || exit 1
cp /usr/lib/ISOLINUX/isolinux.bin ${TMP}/image/isolinux/ || exit 1
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${TMP}/image/isolinux/ || exit 1
cp /boot/memtest86+.bin ${TMP}/image/install/memtest || exit 1
#cp /boot/memtest86+.bin ${TMP}/image/install/memtest || exit 1
cp src/isolinux.txt ${TMP}/image/isolinux/ || exit 1
cp src/isolinux/* ${TMP}/image/isolinux/ || exit 1
cp -r src/pool ${TMP}/image/ || exit 1
cp -r src/dists ${TMP}/image/ || exit 1
#cp src/preferences ${CHROOTDIR}/etc/apt/
cp src/keyboard ${CHROOTDIR}/etc/default/
printf $(sudo du -sx --block-size=1 ${CHROOTDIR} | cut -f1) > ${TMP}image/casper/filesystem.size || exit 1
du -sx --block-size=1 ${CHROOTDIR} | cut -f1 > "${TMP}/image/casper/filesystem.size"
cp src/README.diskdefines ${TMP}/image/ || exit 1
touch ${TMP}image/ubuntu || exit 1
touch ${TMP}/image/ubuntu || exit 1
mkdir ${TMP}/image/.disk || exit 1
cd ${TMP}/image/.disk || exit 1
touch base_installable || exit 1
......
......@@ -39,15 +39,13 @@ PREFIX=$PWD
source ${PREFIX}/common.sh
cp ${SOURCESLISTDEFAULT} ${CHROOTDIR}/etc/apt/sources.list
if [ ! -d "${CHROOTDIR}/etc/apt/sources.list.d" ]; then
mkdir "${CHROOTDIR}/etc/apt/sources.list.d"
fi
cp ${OURSOURCESLIST} ${CHROOTDIR}/etc/apt/sources.list.d/
addToChrootFile $CHROOTFILE "wget -O- http://repo.c3sl.ufpr.br/le6/le.c3sl.ufpr.br.key | apt-key add -"
cp --archive ${SOURCESLISTDEFAULT} ${CHROOTDIR}/etc/apt/sources.list
cp --archive ${OURSOURCESLIST} ${CHROOTDIR}/etc/apt/sources.list.d/
addToChrootFile $CHROOTDIR "wget -O- http://repo.c3sl.ufpr.br/le6/le.c3sl.ufpr.br.key | apt-key add -"
addToChrootFile $CHROOTDIR "apt-get update"
addToChrootFile $CHROOTFILE "apt-get update"
#TODO: CORRIGIR ERRO COM PACOTE UBIQUITY-FRONTEND-KDE UBIQUITY-UBUNTU-ARTWORK
addToChrootFile $CHROOTFILE "apt-get -y dist-upgrade"
addToChrootFile $CHROOTDIR "apt-get -y dist-upgrade"
exit 0
../../../scripts-available/chroot.sh
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment