home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # initialize bootsplash stuff...
- splash=silent
- bs=yes
- box() { true; } # ignore box descriptions in the config file
- if [ -f /etc/bootsplash/themes/current/config/bootsplash-`fbresolution`.cfg ] && [ $splash = silent ] ; then
- . /etc/bootsplash/themes/current/config/bootsplash-`fbresolution`.cfg
- else
- bs=no
- fi
-
- ### first splash screen msg
- if [ $bs = yes ] ; then
- /usr/sbin/progress $text_x $text_y $text_box_dx $text_box_dy 0
- /usr/sbin/fbtruetype -x $text_x -y $text_y -t $text_color -s $text_size "Copying system files..."
- echo "show 40000" > /proc/splash
- fi
-
- #####################################
- # Copying in RAM all movix files...
- #################
- cp -a /cdrom/movix/profile /etc/
- chmod a+x /etc/profile
- cp -a /cdrom/movix/mixer.pl /usr/local/bin/
- chmod a+x /usr/local/bin/mixer.pl
- cp -a /cdrom/movix/rc.lirc /etc/rc.d
- chmod a+x /etc/rc.d/rc.lirc
- cp -a /cdrom/movix/setHardware.pl /usr/local/bin/
- chmod a+x /usr/local/bin/setHardware.pl
- cp -a /cdrom/movix/movix.pl /usr/local/bin/
- chmod a+x /usr/local/bin/movix.pl
- ln -s /usr/local/bin/movix.pl /usr/bin/list
- cp -a /cdrom/movix/bugReport.sh /usr/local/bin/
- chmod a+x /usr/local/bin/bugReport.sh
- cp -a /cdrom/movix/isapnpmodules.sh /sbin
- chmod a+x /sbin/isapnpmodules.sh
- cp -a /cdrom/movix/showisapnpmodules.sh /sbin
- chmod a+x /sbin/showisapnpmodules.sh
- cp -a /cdrom/movix/movixrc /root/.movixrc
- #mkdir /root/.mplayer/
- cp -a /cdrom/movix/config /root/.mplayer/
- cp -a /cdrom/movix/*conf /root/.mplayer/
- cp -a /cdrom/movix/help.txt /root/.mplayer/
- cp -a /cdrom/movix/manpage.txt /root/.mplayer/
- cp -a /cdrom/movix/remotes.data /tmp/
- ln -s /tmp/remotes.data /root/
- cp -a /cdrom/movix/lirc* /tmp/
- ln -s /tmp/lirc* /root/
- mkdir -p /tmp/codecs/
- ln -s /tmp/codecs/ /usr/local/win32
-
- if [ -e /cdrom/mplayer/font ] ; then
- cp -a /cdrom/mplayer/font/ /tmp/
- ln -s /tmp/font/ /root/.mplayer/
- else
- cp -a /cdrom/mplayer/subfont.ttf /tmp/
- ln -s /tmp/subfont.ttf /root/.mplayer/
- fi
-
- # Create a directory for auto-generated subfiles
- mkdir -p /tmp/sub
- ln -s /tmp/sub /root/.mplayer/sub
-
- if [ $bs = yes ] ; then
- /usr/sbin/progress $text_x $text_y $text_box_dx $text_box_dy 0
- /usr/sbin/fbtruetype -x $text_x -y $text_y -t $text_color -s $text_size "Setting up additional modules..."
- echo "show 50000" > /proc/splash
- fi
-
- # copy and load the international keyboard layout
- mkdir -p /usr/local/share
- cp -a /cdrom/movix/shellkey.map /usr/local/share
- loadkmap < /usr/local/share/shellkey.map
-
- if [ -e /cdrom/isolinux/help.txt ]; then
- cp /cdrom/isolinux/help.txt /etc
- fi
-
- if [ -e /cdrom/movix/libdvdcss.so ] ; then
- cp -a /cdrom/movix/libdvdcss.so /lib/libdvdcss.so.2
- fi
- if [ -e /cdrom/movix/libdvdcss-1.2.6-1.i386.rpm ] ; then
- rpm2cpio /cdrom/movix/libdvdcss-1.2.6-1.i386.rpm > /tmp/libdvdcss-1.2.6-1.i386.cpio
- cd /tmp
- cpio -i -u -d -F libdvdcss-1.2.6-1.i386.cpio
- ln -s /tmp/usr/lib/libdvdcss.so.2* /lib
- fi
-
- # Background video
- if [ -e /cdrom/movix/movix.music.avi ]; then
- cp /cdrom/movix/movix.music.avi /tmp/movix.music.avi
- fi
-
- ### Loading the QuickTime DLLs
- if [ `find /cdrom/mplayer/codecs/ -name "qt*"` ] ; then
- echo "Loading QuickTime DLLs in RAM..."
- for i in `ls /cdrom/mplayer/codecs/qt*` ; do cd /tmp/ && bunzip2 -c $i | tar -x ; done;
- ln -s /tmp/qt*/* /tmp/codecs/
- fi
-
- ### Loading the RealPlayer DLLs
- if [ `find /cdrom/mplayer/codecs/ -name "rp*"` ] ; then
- echo "Loading RealPlayer DLLs in RAM..."
- for i in `ls /cdrom/mplayer/codecs/rp*` ; do cd /tmp/ && bunzip2 -c $i | tar -x ; done;
- ln -s /tmp/rp*/* /tmp/codecs/
- fi
-
- ### Loading the Win32 DLLs
- if [ `find /cdrom/mplayer/codecs/ -name "win32*"` ] ; then
- echo "Loading Win32 DLLs in RAM..."
- for i in `ls /cdrom/mplayer/codecs/win32*` ; do cd /tmp && bunzip2 -c $i | tar -x ; done;
- ln -s /tmp/win32*/* /tmp/codecs/
- fi
-
- ### Loading the Xanim DLLs
- if [ `find /cdrom/mplayer/codecs/ -name "xanim*"` ] ; then
- echo "Loading Xanim DLLs in RAM..."
- for i in `ls /cdrom/mplayer/codecs/xanim*` ; do cd /tmp && bunzip2 -c $i | tar -x ; done;
- ln -s /tmp/xanim*/* /tmp/codecs/
- fi
-
- if [ $bs = yes ] ; then
- /usr/sbin/progress $text_x $text_y $text_box_dx $text_box_dy 0
- /usr/sbin/fbtruetype -x $text_x -y $text_y -t $text_color -s $text_size "Libraries loaded"
- echo "show 58000" > /proc/splash
- fi
-
- ### It's easier to do this than including ldconfig in MoviX
- ln -s /usr/local/mplayer/lib/lib* /usr/lib
- ### Let's use aliases for the movix script to let play dvd, vcd, mp3 CD & audio cd
- ln -s /usr/bin/movix /usr/bin/dvd
- ln -s /usr/bin/movix /usr/bin/vcd
- ln -s /usr/bin/movix /usr/bin/acd
- ln -s /usr/bin/movix /usr/bin/mcd
-
- ##############################################
- ### Load a few modules
- ########################
- /usr/local/bin/setHardware.pl
-
- ### Start the lirc daemon if a remote is found
- /etc/rc.d/rc.lirc
-
- ##############################################
- # Detect & load ISA modules #
- ##############################################
-
- get_isapnp_modules () {
- while read IGNORE ID IGNORE
- do
- DEVICE="0x"`echo $ID | cut -b6-7``echo $ID | cut -b4-5`
- cat /lib/modules/`uname -r`/modules.isapnpmap | grep "^[^ ][^ ]* *[^ ][^ ]* *$DEVICE " | cut -f 1 -d " "
- done
- }
-
- for MODULE in `get_isapnp_modules < /proc/bus/isapnp/devices | sort -u`
- do
- echo Loading module $MODULE
- modprobe -s $MODULE
- done
-
- if [ $bs = yes ] ; then
- /usr/sbin/progress $text_x $text_y $text_box_dx $text_box_dy 0
- /usr/sbin/fbtruetype -x $text_x -y $text_y -t $text_color -s $text_size "Setup ready, starting eMoviX playback..."
- echo "show 65500" > /proc/splash
- fi
-
- umount /cdrom
- rm -rf /cdrom
- /bin/setterm -blank 0
-