Contents of /trunk/mlivecdbuild/profiles/mcore-i486/prepare_custom
Parent Directory | Revision Log
Revision 1409 -
(show annotations)
(download)
Thu Jun 16 11:11:54 2011 UTC (13 years, 3 months ago) by niro
File size: 2389 byte(s)
Thu Jun 16 11:11:54 2011 UTC (13 years, 3 months ago) by niro
File size: 2389 byte(s)
-added alx-0.6 branch profile
1 | #!/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-mcore || 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 mcore with empty password |
30 | chroot ${LIVECDROOT}/install-temp adduser -G users -h /home/mcore -s /bin/bash -D mcore |
31 | |
32 | # check for missing fifo! - del me if this is resolved |
33 | if [[ -d ${LIVECDROOT}/install-temp/etc/splash ]] && [[ ! -p ${LIVECDROOT}/install-temp/etc/splash/fbfifo ]] |
34 | then |
35 | mkfifo ${LIVECDROOT}/install-temp/etc/splash/fbfifo |
36 | fi |
37 | |
38 | # fix hostname and hosts file |
39 | echo "mcore" > ${LIVECDROOT}/install-temp/etc/hostname |
40 | echo "127.0.0.1 localhost mcore.magellan-linux.de mcore" > ${LIVECDROOT}/install-temp/etc/hosts |
41 | cat >> ${LIVECDROOT}/install-temp/etc/hosts << EOF |
42 | ::1 ip6-localhost ip6-loopback |
43 | fe00::0 ip6-localnet |
44 | ff00::0 ip6-mcastprefix |
45 | ff02::1 ip6-allnodes |
46 | ff02::2 ip6-allrouters |
47 | ff02::3 ip6-allhosts |
48 | EOF |
49 | |
50 | # add mcored default user |
51 | ( echo "foobar"; sleep 0.1; echo "foobar" ) | chroot ${LIVECDROOT}/install-temp /usr/bin/mcorepasswd |
52 | |
53 | # create default xinitrc |
54 | echo "exec startfluxbox" > ${LIVECDROOT}/install-temp/home/mcore/.xinitrc |
55 | |
56 | # enable x11 aware splash to reduce flicker |
57 | sed -i "s:#\(SPLASH_X11_TTY=\).*:\1\"\$\{SPLASH_TTY\}\":" ${LIVECDROOT}/install-temp/etc/splash/splash.conf |
58 | |
59 | # create tarball |
60 | [[ -f ${CDISOROOT}/system/mcore.tar.bz2 ]] && rm ${CDISOROOT}/system/mcore.tar.bz2 |
61 | ( cd ${LIVECDROOT}/install-temp; tar cvjpf ${CDISOROOT}/system/mcore.tar.bz2 ./ | tee log) |
62 | |
63 | # create images.conf |
64 | echo "CDIMAGENAME=mcore.tar.bz2" > ${CDISOROOT}/system/images.conf |
65 | echo "TOTALLINES=$(wc -l ${LIVECDROOT}/install-temp/log | cut -d' ' -f1)" >> ${CDISOROOT}/system/images.conf |
66 | |
67 | # clean up |
68 | if [[ -d ${LIVECDROOT}/install-temp ]] |
69 | then |
70 | rm -rf ${LIVECDROOT}/install-temp |
71 | fi |