Magellan Linux

Annotation of /trunk/mlivecdbuild/profiles/alx-0_6_branch/prepare_custom

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1409 - (hide annotations) (download)
Thu Jun 16 11:11:54 2011 UTC (12 years, 11 months ago) by niro
File size: 2048 byte(s)
-added alx-0.6 branch profile
1 niro 1409 #!/bin/bash
2    
3     # set an empty root password
4     chroot ${CDCHROOTDIR} passwd -d root
5    
6     # stop here if the user don't want to create the install tarball
7     [[ ! -z ${SKIP_CREATE_INSTALL_TARBALL} ]] && exit 0
8    
9    
10     ##
11     # create the install tarball
12     ##
13    
14     install -d ${LIVECDROOT}/install-temp
15     install -d ${CDISOROOT}/system
16    
17     # use all settings from the global config, but the basesystem
18     # has to be the normal install basesystem not for livecds
19     mage-bootstrap \
20     --root ${LIVECDROOT}/install-temp \
21     --profile ${MAGE_PROFILE} \
22     --magerc ${MAGERC} \
23     --toolchain ${TOOLCHAIN} \
24     --basesystem basesystem || die "bootstrapping target system failed!"
25    
26     # set an empty root password for the install system too
27     chroot ${LIVECDROOT}/install-temp passwd -d root
28    
29     # add user station with empty password
30     chroot ${LIVECDROOT}/install-temp adduser -G users -h /home/station -s /bin/bash -D station
31    
32     # fix hostname and hosts file
33     echo "alx-i486" > ${LIVECDROOT}/install-temp/etc/hostname
34     echo "127.0.0.1 localhost alx-i486.magellan-linux.de alx-i486" > ${LIVECDROOT}/install-temp/etc/hosts
35     cat >> ${LIVECDROOT}/install-temp/etc/hosts << EOF
36     ::1 ip6-localhost ip6-loopback
37     fe00::0 ip6-localnet
38     ff00::0 ip6-mcastprefix
39     ff02::1 ip6-allnodes
40     ff02::2 ip6-allrouters
41     ff02::3 ip6-allhosts
42     EOF
43    
44     # create a default network intface config file
45     cat > ${LIVECDROOT}/install-temp/etc/conf.d/net.eth0 << EOF
46     ONBOOT="yes"
47     NETWORKING="dhcp"
48     EOF
49    
50     # create default xinitrc
51     echo "exec startfluxbox" > ${LIVECDROOT}/install-temp/home/station/.xinitrc
52    
53     # create tarball
54     [[ -f ${CDISOROOT}/system/alx-i486.tar.bz2 ]] && rm ${CDISOROOT}/system/alx-i486.tar.bz2
55     ( cd ${LIVECDROOT}/install-temp; tar cvjpf ${CDISOROOT}/system/alx-i486.tar.bz2 ./ | tee log)
56    
57     # create images.conf
58     echo "CDIMAGENAME=alx-i486.tar.bz2" > ${CDISOROOT}/system/images.conf
59     echo "TOTALLINES=$(wc -l ${LIVECDROOT}/install-temp/log | cut -d' ' -f1)" >> ${CDISOROOT}/system/images.conf
60    
61     # clean up
62     if [[ -d ${LIVECDROOT}/install-temp ]]
63     then
64     rm -rf ${LIVECDROOT}/install-temp
65     fi