Author: shadzik
Date: Sun Aug  8 12:24:38 2010
New Revision: 11764

Modified:
   livecd/mklive/mklive
Log:
- add bootsplash functionality, fix some typos


Modified: livecd/mklive/mklive
==============================================================================
--- livecd/mklive/mklive        (original)
+++ livecd/mklive/mklive        Sun Aug  8 12:24:38 2010
@@ -111,6 +111,10 @@
        ldconfig -r $tmp_initrd
        chown -R root:root $tmp_initrd/*
        find $tmp_initrd -name \*~ -exec rm \{\} \; # cleanup
+       if [ $bootsplash_arg -eq 1 ]; then
+               echo "Creating bootsplash"
+               /bin/splash.bin -s -f $bootsplash > $tmp_initrd/bootsplash
+       fi
        echo "Creating initramfs image: $2"
        cd $tmp_initrd
        find . | cpio -H newc -o | $compr > $2
@@ -134,6 +138,7 @@
        echo "  --lzma - use lzma compression instead gzip"
        echo "  --gzip - use gzip compression (default)"
        echo -e "  --tpl=tpl-dir - templates dir ("templates" by default)\n"
+       echo "  --bootsplash=config - enable bootsplash (default no)"
        echo "  mklive script creates a live cd/dvd system based on PLD-Linux"
        echo "  installed into directory."
        echo " example 1:"
@@ -145,12 +150,17 @@
 
 ##### MAIN #####
 templatesDir=templates
+bootsplash_arg=0
 for arg in $@
 do
         case $arg in
                 --lzma) compr=lzma ;;
                 --gzip) compr=gzip ;;
-               --tpl=*) templatesDir=$(echo $arg | sed 's/.*=//') ;;
+               --tpl=*) templatesDir=$(echo $arg | sed 's/.*tpl=//;s/--.*//') 
;;
+               --bootsplash=*)
+                       bootsplash_arg=1
+                       bootsplash=$(echo $arg | sed 
's/.*bootsplash=//;s/--.*//')
+                       ;;
                -h|--help)
                        print_help
                        exit 0
@@ -192,11 +202,13 @@
 echo ""
 
 # is templates exists
-[ ! -d $mkroot/$templatesDir ] && die "templates dir: $mkroot/$templatesDir 
does not exists."
+[ ! -d $mkroot/$templatesDir ] && die "templates dir: $mkroot/$templatesDir 
does not exist."
+# does bootsplash configuration exist
+[ ! -f $bootsplash ] && die "bootsplash configuratios: $bootsplash does not 
exist."
 # is destination exists
 if [ -a $dst_iso ]
 then
-       echo "Warning: $dst_iso already file exists."
+       echo "Warning: $dst_iso file already exists."
        echo "Do you wish to overwrite? [N/y]"
        read anykey
        [ ! "$anykey" = 'y' ] && die "Interrupted." || rm -f $dst_iso
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to