Changeset 1926

Show
Ignore:
Timestamp:
06/23/07 23:25:17 (19 months ago)
Author:
alexander
Message:

Switch the greeting based on availability of LFS sources on the CD

Location:
trunk
Files:
2 added
2 modified
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r1923 r1926  
    115115        mkdir -p $(MP) $(MPBASE)$(SRC) $(MPBASE)$(WD)/bin $(MPBASE)/iso/boot 
    116116        mount -o loop root.ext2 $(MP) 
    117         -rm -f $(MP)/boot $(MP)$(LFSSRC) 
     117        -rm -f $(MP)/boot 
    118118        mkdir -p $(MKTREE) $(MP)$(SRC) $(MP)$(WD) 
    119119        mkdir -p $(MP)/boot $(MP)$(LFSSRC) $(MPBASE)/iso$(LFSSRC) 
     
    187187        @chroot "$(MP)" $(chenv-blfs) 'set +h && cd $(ROOT) && \ 
    188188         make blfs $(chbash-post-bash)' 
    189         @install -m644 etc/issue $(MP)/etc/issue 
     189        @install -m644 etc/issue* $(MP)/etc 
    190190 
    191191lfsuser: 
     
    363363        mandb -c 2>/dev/null 
    364364        echo 'dummy / ext2 defaults 0 0' >/etc/mtab 
    365         updatedb --prunepaths='/sources /tools /lfs-livecd /proc /sys /dev /tmp /var/tmp' 
     365        updatedb --prunepaths='/sources /tools /lfs-livecd /lfs-sources /proc /sys /dev /tmp /var/tmp' 
    366366        echo >/etc/mtab 
    367367 
     
    380380        @install -m644 isolinux/{isolinux.cfg,*.msg,splash.lss} $(MP)/boot/isolinux 
    381381        @sed -i "s/Version:/Version: $(VERSION)/" $(MP)/boot/isolinux/boot.msg 
    382         @sed -i "s/Version:/Version: $(VERSION)/" $(MP)/etc/issue 
     382        @sed -i "s/Version:/Version: $(VERSION)/" $(MP)/etc/issue* 
    383383        @install -m644 doc/README doc/lfscd-remastering-howto.txt $(MP)/root 
    384384        @sed -i "s/\[version\]/$(VERSION)/" $(MP)/root/README 
     
    442442        -rmdir $(MP)$(SRC) $(MP)$(WD) $(MP)$(ROOT) 
    443443        -rmdir $(MP)/boot $(MP)$(LFSSRC) 
    444         -ln -s /dev/shm/.cdrom/boot /dev/shm/.cdrom$(LFSSRC) $(MP) 
     444        -ln -s /dev/shm/.cdrom/boot $(MP) 
    445445        -umount $(MP) 
    446446 
  • trunk/packages/initramfs/init.in

    r1912 r1926  
    1515all_generic_ide=0 
    1616toram=0 
     17cdtype= 
    1718 
    1819find_cd() { 
     
    4243 
    4344copy_cd_to_ram() { 
     45        echo "Copying LFS LiveCD to RAM. This will take several minutes..." 
    4446        mount -n -t iso9660 -o ro,norock /dev/lfs-cd /.tmpfs/.cdrom 
    4547        cat /fakecd.iso.head >/.tmpfs/.fakecd.iso 
     
    8183} 
    8284 
     85detect_cd_type() { 
     86        mount -n -t iso9660 -o ro /dev/lfs-cd /.tmpfs/.cdrom 
     87        if [ -d /.tmpfs/.cdrom/lfs-sources ] ; then 
     88                if [ "$toram" = 1 ] ; then 
     89                        cdtype=toram 
     90                else 
     91                        cdtype=fullcd 
     92                fi 
     93        else 
     94                cdtype=nosrc 
     95        fi 
     96        umount -n /.tmpfs/.cdrom 
     97} 
     98 
     99 
    83100do_mount_cd() { 
    84101        i=1 
     
    120137        mount -n -t tmpfs -o size=90% tmpfs /.tmpfs 
    121138        mkdir /.tmpfs/.cdrom 
     139        detect_cd_type 
    122140        if [ "$toram" = 1 ] ; then copy_cd_to_ram ; fi 
    123141        mount -n -t iso9660 -o ro /dev/lfs-cd /.tmpfs/.cdrom 
     
    133151        if [ "$toram" != 1 ] ; then cp -a /dev/lfs-cd /.root/dev/lfs-cd ; fi 
    134152        cat /etc/modprobe.conf >>/.root/etc/modprobe.conf 
     153        ln -sf issue.$cdtype /.root/etc/issue 
     154        if [ "$cdtype" = "fullcd" ] ; then 
     155                ln -sf /dev/shm/.cdrom/lfs-sources /.root/lfs-sources 
     156        fi 
    135157} 
    136158