#!/bin/bash # set an empty root password chroot ${CDCHROOTDIR} passwd -d root # stop here if the user don't want to create the install tarball [[ ! -z ${SKIP_CREATE_INSTALL_TARBALL} ]] && exit 0 ## # create the install tarball ## install -d ${LIVECDROOT}/install-temp install -d ${CDISOROOT}/system # use all settings from the global config, but the basesystem # has to be the normal install basesystem not for livecds mage-bootstrap \ --root ${LIVECDROOT}/install-temp \ --profile ${MAGE_PROFILE} \ --magerc ${MAGERC} \ --toolchain ${TOOLCHAIN} \ --basesystem basesystem || die "bootstrapping target system failed!" # set an empty root password for the install system too chroot ${LIVECDROOT}/install-temp passwd -d root # add user station with empty password chroot ${LIVECDROOT}/install-temp adduser -G users -h /home/station -s /bin/bash -D station # fix hostname and hosts file echo "alx-i486" > ${LIVECDROOT}/install-temp/etc/hostname echo "127.0.0.1 localhost alx-i486.magellan-linux.de alx-i486" > ${LIVECDROOT}/install-temp/etc/hosts cat >> ${LIVECDROOT}/install-temp/etc/hosts << EOF ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts EOF # create a default network intface config file cat > ${LIVECDROOT}/install-temp/etc/conf.d/net.eth0 << EOF ONBOOT="yes" NETWORKING="dhcp" EOF # create default xinitrc echo "exec startfluxbox" > ${LIVECDROOT}/install-temp/home/station/.xinitrc # create tarball [[ -f ${CDISOROOT}/system/alx-i486.tar.bz2 ]] && rm ${CDISOROOT}/system/alx-i486.tar.bz2 ( cd ${LIVECDROOT}/install-temp; tar cvjpf ${CDISOROOT}/system/alx-i486.tar.bz2 ./ | tee log) # create images.conf echo "CDIMAGENAME=alx-i486.tar.bz2" > ${CDISOROOT}/system/images.conf echo "TOTALLINES=$(wc -l ${LIVECDROOT}/install-temp/log | cut -d' ' -f1)" >> ${CDISOROOT}/system/images.conf # clean up if [[ -d ${LIVECDROOT}/install-temp ]] then rm -rf ${LIVECDROOT}/install-temp fi