#! /usr/bin/gtkdialog -e # # gtkHDinstall, The GoblinX Harddisk Installer # Author: Grobsch(Flavio de Oliveira) # VERSION: 2.5 # Call library functions . /usr/lib/libgoblix . /usr/lib/liblinuxlive # Help Functions locales_help(){ echo " GoblinX has support for five languages directly included into the livecd, as listed in the respective combobox, but other languages are also support. In order to enable another language as system default locale, you must download the language and use this button to add it to the installed system. After choose the module, it will be added as default and you do not need to change the combobox."> /tmp/help_3 } lessmos_help(){ echo " GoblinX is built around several modules for different kind of applications. The installer will by default uncompress all modules to your harddisk, unless you use this button to remove some modules you do not wish to install. You cannot remove the a.Core and the a.Kernel, because GoblinX will not work or boot without these modules."> /tmp/help_3 } addmos_help(){ echo " GoblinX is built around several modules for different kind of applications. Allthough the livecd includes good options of programs, you may wish to add more. If you have downloaded some extra modules, like for example locales (languages) ones, you can use this button to install them during the instalation process to save time."> /tmp/help_3 } users_help(){ echo " The administration(root) controls every part of system, thus you have to create a non-root user and change the root password to have a more secure system. The root password will be changed during this session of the livecd and then copied to the installed partition, and also the new user account. If you wish to let your user uses sudo command, do not forget to add it to the wheel group. In order to save these changes you need to use let the configsave combobox as SAVE. You MUST use a good password, try create one with letters, numbers and even symbols like hyphen. You can change root password after first boot if you desire, but do NOT forget to change it"> /tmp/help_3 } gparted_help(){ echo " The installer pre-selected all mounted partitions you have on your harddisk, if there is an empty one already prepared to be used, just select it. You do not need to format the partition again if you have already formatted it before. If you do not have any free partition, you must use gParted to create one. GParted uses libparted to detect and manipulate devices and partitiontables and it is included by default to GoblinX Premium."> /tmp/help_3 } # Functions passive_(){ DISPLAY=:0.0 dbus-launch notify-send -i gtk-info -t 2000 'Installer Notification' "$2" } checkroot(){ if [ "$(whoami)" != 'root' ]; then zenity --title="Error Message" --error --text "You must be root to run this application" 0 0 exit 1 fi } check_dest(){ if [ "$DEST" = "" ]; then zenity --title="Error Message" --error --text "You must select a mounted partition" 0 0 PDIN="`ps x | egrep -v grep | grep "gtkdialog -i /usr/bin/gtkHDInstall" | cut -f 1 -d " "`" kill $PDIN /usr/bin/gtkHDInstall else echo $DEST > /tmp/dest_install fi } live_data(){ DATAFROM=$(cmdline_value from) if [ "$DATAFROM" ]; then DATAFROM=$(find_in_computer $DATAFROM) if [ "$DATAFROM" ]; then if [ $? -eq 0 -a "$(find_modules $LOOPMOUNT/$LIVECDNAME)" != "" ]; then passive "found in $DATAFROM" LIVEDATA=$LOOPMOUNT/$LIVECDNAME fi fi fi if [ "$DATA" = "" ]; then # from= is not used or it didn't contain valid data LIVEDATA=$(find_in_computer $LIVECDNAME/$LIVECDSGN) LIVEDATA=$(dirname $LIVEDATA 2>/dev/null) fi } live_(){ cat /tmp/livedata_found } progress_fast(){ live_data i=10 while [ "$LIVEDATA" = "" ]; do echo "$i + 10" done echo "100" echo Found $LIVEDATA/$LIVECDSGN echo $LIVEDATA > /tmp/livedata_found } create_files(){ if [ ! -e /tmp/extra_modules ]; then touch /tmp/extra_modules fi } getpoints(){ ls -aA1bd /mnt/*{1,2,3,4,5,6,7,8,9} 2>/dev/null | while read LINE; do MOUNT=`mount | grep -F "$LINE" | cut -d " " -f 1` if [ ! "$MOUNT" = "" ]; then echo "$LINE" fi done } second_warning(){ zenity --warning --text "The install script is going to prepare the choosen partition, all data will be lost.\nDo you wish to continue?" if [ $? -eq 0 ] then $1 else continue fi } formatdest(){ POINT="`basename $DEST`" umount -f /dev/$POINT mkfs.$FSTYPE -q /dev/$POINT | zenity --progress --pulsate --auto-close --text "Formatting mounted partition $DEST" mount /dev/$POINT /mnt/$POINT } deletedest(){ POINT="`basename $DEST`" rm -rf /mnt/$POINT/* | zenity --progress --pulsate --auto-close --text "Deleting all files on $DEST" } repairdest(){ POINT="`basename $DEST`" TYPE=`fsck -N /dev/$POINT` umount /dev/$POINT if echo $TYPE | grep -i reiserfs >/dev/null 2>/dev/null then reiserfsck --check -q -y /dev/$POINT | zenity --progress --pulsate --auto-close --text "Checking mounted partition $DEST" mount /dev/$POINT elif echo $TYPE | grep -i ext3 >/dev/null 2>/dev/null then e2fsck -y /dev/$POINT | zenity --progress --pulsate --auto-close --text "Checking mounted partition $DEST" mount /dev/$POINT elif echo $TYPE | grep -i xfs >/dev/null 2>/dev/null then xfs_repair /dev/$POINT | zenity --progress --pulsate --auto-close --text "Checking mounted partition $DEST" mount /dev/$POINT else mount /dev/$POINT fi } second_exec(){ if echo $FORMAT | grep Completely 1>/dev/null 2>/dev/null then second_warning formatdest elif echo $FORMAT | grep Delete 1>/dev/null 2>/dev/null then second_warning deletedest elif echo $FORMAT | grep Repair 1>/dev/null 2>/dev/null then second_warning repairdest elif echo $FORMAT | grep NOTHING 1>/dev/null 2>/dev/null then continue else continue fi } makedirs(){ mkdir -p $DEST/{bin,usr,etc,var/tmp,lib,opt,sbin,dev,proc,boot,tmp,sys,mnt,home} 2>/dev/null mkdir -p $DEST/home/Mymods 2>/dev/null mkdir -p $DEST/{var/lib,var/lib/modules} 2>/dev/null chmod 777 $DEST/{tmp,var/tmp} if [ "$?" -ne 0 ]; then zenity --title="Error Message" --error --text "Cannot create directories in $DEST" 0 0 fi } createmountpoints(){ ls -aA1b /mnt | while read LINE; do if [ "$LINE" != "live" ]; then mkdir -p $DEST/mnt/$LINE fi done } getimos(){ rm /tmp/{base_mods,modules_mods,optional_mods} LIDATA="`cat /tmp/livedata_found`" ls -R $LIDATA/{base,modules,optional} | egrep '[.]lzm$' > /tmp/list_modules } to_install(){ rm /tmp/{base_mods,modules_mods,video_mods,optional_mods} 1>/dev/null 2>/dev/null cat /tmp/list_modules | tr " " "\n" | egrep '.lzm$' | sed "s/\"//g" | sed "s/'//g" >/tmp/install_modules cat /tmp/install_modules | while read LINE ; do LIDATA="`cat /tmp/livedata_found`" if ls $LIDATA/base | grep $LINE 1>/dev/null 2>/dev/null; then echo $LINE >>/tmp/base_mods fi if ls $LIDATA/modules | grep $LINE 1>/dev/null 2>/dev/null; then echo $LINE >>/tmp/modules_mods fi if ls $LIDATA/optional | grep $LINE 1>/dev/null 2>/dev/null; then echo $LINE >>/tmp/optional_mods fi done } less_modules(){ getimos to_install rm /tmp/install_mos cat /tmp/install_modules | while read LINE; do TMPMOD="FALSE $LINE"; echo $TMPMOD >>/tmp/install_mos done PKGLIST="`cat /tmp/install_mos`" zenity --title "Modules Remove Dialog" --text "Select modules from the list below to not install..." --list --width=400 --height=550 --multiple --separator=" " --checklist --column "Remove" --column "Packages" $PKGLIST > /tmp/re_paks if [ "$?" = "" ]; then exit 1; fi cat /tmp/re_paks | tr " " "\n" > /tmp/re_paks2 passmodules } add_modules(){ zenity --title "Choose extra modules to be installed" --separator=" " --multiple --file-selection >/tmp/selected_mods cat /tmp/selected_mods | tr " " "\n" > /tmp/extra_modules cat /tmp/selected_mods >> /tmp/extra_mods } getmodules(){ cat /tmp/extra_modules } passmodules(){ rm /tmp/{modules_base,modules_module,modules_optional} 1>/dev/null 2>/dev/null LIDATA="`cat /tmp/livedata_found`" cat /tmp/base_mods | while read LINE; do if ! grep $LINE /tmp/re_paks2 1>/dev/null 2>/dev/null; then echo $LIDATA/base/$LINE >>/tmp/modules_base; fi; done cat /tmp/modules_mods | while read LINE; do if ! grep $LINE /tmp/re_paks2 1>/dev/null 2>/dev/null; then echo $LIDATA/modules/$LINE >>/tmp/modules_module; fi; done cat /tmp/optional_mods | while read LINE; do if ! grep $LINE /tmp/re_paks2 1>/dev/null 2>/dev/null; then echo $LIDATA/optional/$LINE >>/tmp/modules_optional; fi; done echo "OK" > /tmp/module_removed } gparted_(){ if which gparted >/dev/null; then gparted else zenity --title="Error Message" --error --text "No GParted package founded, you need to download it." 0 0 fi } configure_lang(){ . /usr/lib/liblangs if [ -e /tmp/locale_added ]; then continue else if [ "$LANG" == "English" ] then continue elif [ "$LANG" == "Spanish" ] then lang_ES elif [ "$LANG" == "French" ] then lang_FR elif [ "$LANG" == "Deutsch" ] then lang_DE elif [ "$LANG" == "Portuguese" ] then lang_BR else continue fi fi } get_languages(){ LANGMO="`zenity --title "Choose language modules to be installed" --separator=" " --file-selection`" echo "Uncompressing $LANGMO..." insert_module $DEST $LANGMO /tmp 1>/dev/null 2>/dev/nul SLANG="`echo "$LANGMO" | tr "/" "\n" | tail -1 | cut -f2 -d "-" | sed 's/.lzm//g'`" ILANG="`echo "$LANGMO" | tr "/" "\n" | tail -1 | cut -f2 -d "-" | sed 's/.lzm//g' | cut -f1 -d "_"`" echo "# Language" >> $DEST/etc/profile echo "export LC_ALL=$SLANG" >> $DEST/etc/profile echo "export LANG=$SLANG" >> $DEST/etc/profile if which kdialog 1>/dev/null 2>/dev/null; then echo "Country=$ILANG" >> $DEST/root/.kde/share/config/kdeglobals echo "Language=$ILANG" >> $DEST/root/.kde/share/config/kdeglobals fi echo "OK" >/tmp/locale_added } configure_init(){ if [ "$LEVEL" == "Multiuser Mode (3)" ] then LEV=`cat /etc/inittab | grep id | cut -f2 -d ":"` sed "s/id:$LEV/id:3/" /etc/inittab > $DEST/etc/inittab elif [ "$LEVEL" == "Single Mode (1)" ] then LEV=`cat /etc/inittab | grep id | cut -f2 -d ":"` sed "s/id:$LEV/id:1/" /etc/inittab > $DEST/etc/inittab elif [ "$LEVEL" == "X11 KDM/GDM/XDM (4)" ] then LEV=`cat /etc/inittab| grep id | cut -f2 -d ":"` sed "s/id:$LEV/id:4/" /etc/inittab > $DEST/etc/inittab else continue fi } fixfstab(){ FSTABTMP=/tmp/fstab$$ DEV="`basename $DEST`" echo -ne "" >$FSTABTMP cp /etc/fstab $DEST/etc/fstab cat $DEST/etc/fstab | while read LINE; do if [ "0$FIRST" -ne 0 ]; then # Skip first line echo $LINE >>$FSTABTMP fi FIRST=1 done FS="`blkid -s TYPE /dev/$DEV | cut -d = -f 2 | tr -d ' \"'`" echo "`mount | grep -w $DEST | cut -f 1 -d \" \"` / $FS defaults 1 1" > $DEST/etc/fstab.new cat $FSTABTMP | egrep -v $DEST >> $DEST/etc/fstab.new mv $DEST/etc/fstab.new $DEST/etc/fstab } root_pass(){ if [ "$NEWROOTPASS" != "" ]; then if [ "$NEWROOTPASS" = "$NEWROOTPASS02" ]; then echo "root:$NEWROOTPASS" | /usr/sbin/chpasswd else zenity --title="Error Message" --error --text "Your confirm password does not match, try again." 0 0 fi fi } user_create(){ if [ "$USERID" != "" ]; then useradd -m -c $USERID -d /home/$USERID -s '/bin/bash' $USERID -g users -G $USERGRPS usermod -p "" $USERID mkdir $DEST/tmp/ksocket-$USERID chown -R $USERID:users $DEST/tmp/ksocket-$USERID # change password if [ ! "$USERPASS" = "" ]; then echo "$USERID:$USERPASS" | /usr/sbin/chpasswd fi fi } config_save(){ configsave $DEST/tmp/confsave.lzm lzm2dir $DEST/tmp/confsave.lzm $DEST/ } last(){ cd $DEST chmod 666 dev/ptmx rm dev/{console,null,systty,tty,tty0,tty1} mknod $DEST/dev/console c 5 1 mknod $DEST/dev/null c 1 3 mknod $DEST/dev/tty c 5 0 mknod $DEST/dev/tty0 c 4 1 mknod $DEST/dev/tty1 c 4 1 rm -rf $DEST/tmp/* chmod 777 $DEST/tmp rm $DEST/root/.fluxbox/autostart/gidesk.desktop 1>/dev/null 2>/dev/null find $DEST/home -name 'gidesk.desktop' | xargs rm 1>/dev/null 2>/dev/null } install_mos(){ sleep 1 echo "05" && echo "Destination partition is being prepared..." second_exec echo "10" && echo "Creating dirs and mount points..." makedirs createmountpoints for i in `cat /tmp/modules_base | tr '/' '\n' | grep '.lzm$'`; do MODULE="`cat /tmp/modules_base | grep $i`" case $i in a.Bindings-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "11" && echo "Uncompressing $i..." sleep 2 ;; a.Core-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "13" && echo "Uncompressing $i..." sleep 2 ;; a.Defapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "15" && echo "Uncompressing $i..." sleep 2 ;; a.Deflibs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "17" && echo "Uncompressing $i..." sleep 2 ;; a.Dev4Use-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "19" && echo "Uncompressing $i..." sleep 2 ;; a.Devel-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "21" && echo "Uncompressing $i..." sleep 2 ;; a.Docs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "23" && echo "Uncompressing $i..." sleep 2 ;; a.Drivers-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "25" && echo "Uncompressing $i..." sleep 2 ;; a.EXapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "27" && echo "Uncompressing $i..." sleep 2 ;; a.Enlight-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "28" && echo "Uncompressing $i..." sleep 2 ;; a.Extrapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "29" && echo "Uncompressing $i..." sleep 2 ;; a.Fluxbox-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "31" && echo "Uncompressing $i..." sleep 2 ;; a.GStreamer-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "33" && echo "Uncompressing $i..." sleep 2 ;; a.Games-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "35" && echo "Uncompressing $i..." sleep 2 ;; a.Glibc-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "37" && echo "Uncompressing $i..." sleep 2 ;; a.Goblix-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "38" && echo "Uncompressing $i..." sleep 2 ;; a.Help-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "39" && echo "Uncompressing $i..." sleep 2 ;; a.Includes-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "40" && echo "Uncompressing $i..." sleep 2 ;; a.Kde-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "42" && echo "Uncompressing $i..." sleep 2 ;; a.Kdedocs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "44" && echo "Uncompressing $i..." sleep 2 ;; a.Kdeincludes-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "46" && echo "Uncompressing $i..." sleep 2 ;; a.Kdelibs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "47" && echo "Uncompressing $i..." sleep 2 ;; a.Kdeplus-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "48" && echo "Uncompressing $i..." sleep 2 ;; a.Kderemoved-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "49" && echo "Uncompressing $i..." sleep 2 ;; a.Kernel-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "51" && echo "Uncompressing $i..." sleep 2 ;; a.Mapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "53" && echo "Uncompressing $i..." sleep 2 ;; a.Mcore-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "55" && echo "Uncompressing $i..." sleep 2 ;; a.Media-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "57" && echo "Uncompressing $i..." sleep 2 ;; a.Mlibs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "59" && echo "Uncompressing $i..." sleep 2 ;; a.Moreapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "61" && echo "Uncompressing $i..." sleep 2 ;; a.Mozilla-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "62" && echo "Uncompressing $i..." sleep 2 ;; a.Network-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "63" && echo "Uncompressing $i..." sleep 2 ;; a.Plus-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "65" && echo "Uncompressing $i..." sleep 2 ;; a.Removed-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "66" && echo "Uncompressing $i..." sleep 2 ;; a.Sapps-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "67" && echo "Uncompressing $i..." sleep 2 ;; a.Score-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "68" && echo "Uncompressing $i..." sleep 2 ;; a.Slibs-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "69" && echo "Uncompressing $i..." sleep 2 ;; a.System-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "70" && echo "Uncompressing $i..." sleep 2 ;; a.WMaker-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "71" && echo "Uncompressing $i..." sleep 2 ;; a.X11-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "72" && echo "Uncompressing $i..." sleep 2 ;; a.X3D-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "73" && echo "Uncompressing $i..." sleep 2 ;; a.XBeryl-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "74" && echo "Uncompressing $i..." sleep 2 ;; a.XPlus-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "75" && echo "Uncompressing $i..." sleep 2 ;; a.Xfce-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "76" && echo "Uncompressing $i..." sleep 2 ;; a.Xwm-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "77" && echo "Uncompressing $i..." sleep 2 ;; ap.Firefox-*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "78" && echo "Uncompressing $i..." sleep 2 ;; ap.Sylpheed-*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "79" && echo "Uncompressing $i..." sleep 2 ;; ap.Thunderbird-*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "80" && echo "Uncompressing $i..." sleep 2 ;; i.Locales-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "81" && echo "Uncompressing $i..." sleep 2 ;; i.i18n_de-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "82" && echo "Uncompressing $i..." sleep 2 ;; i.i18n_es-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "83" && echo "Uncompressing $i..." sleep 2 ;; i.i18n_fr-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "84" && echo "Uncompressing $i..." sleep 2 ;; i.i18n_pt_BR-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "85" && echo "Uncompressing $i..." sleep 2 ;; z.Duser-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "86" && echo "Uncompressing $i..." sleep 2 ;; z.Goblix-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "87" && echo "Uncompressing $i..." sleep 2 ;; z.Kde-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "87" && echo "Uncompressing $i..." sleep 2 ;; z.Micro-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "88" && echo "Uncompressing $i..." sleep 2 ;; z.Mini-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "89" && echo "Uncompressing $i..." sleep 2 ;; z.Muser-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "90" && echo "Uncompressing $i..." sleep 2 ;; z.Premium-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "90" && echo "Uncompressing $i..." sleep 2 ;; z.User-?-i486-v*.lzm) insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/null echo "91" && echo "Uncompressing $i..." sleep 2 ;; esac done cat /tmp/modules_module | while read LINE; do if [ "$LINE" != "" ]; then MODULE="`find $LIVEDATA -name $LINE`" insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/nul echo "92" && echo "Uncompressing $MODULE from /modules..." fi done cat /tmp/modules_optional | while read LINE; do if [ "$LINE" != "" ]; then MODULE="`find $LIVEDATA -name $LINE`" insert_module $DEST $MODULE /tmp 1>/dev/null 2>/dev/nul echo "93" && echo "Uncompressing $MODULE from /optional..." fi done cat /tmp/extra_mods | while read LINE; do if [ "$LINE" != "" ]; then MODULE="`find $LIVEDATA -name $LINE`" insert_module $DEST $LINE /tmp 1>/dev/null 2>/dev/nul echo "94" && echo "Uncompressing Extra Modules..." fi done lspci | grep VGA > /etc/vga.dat if ( cat /etc/vga.dat | grep -i nVidia 1>/dev/null 2>/dev/null ) then FILE=`ls $LIVEDATA/video/ | grep nvidia` if [ "$FILE" != "" ]; then insert_module $DEST $LIVEDATA/video/$FILE /tmp 1>/dev/null 2>/dev/nul fi elif ( cat /etc/vga.dat | grep -i Radeon 1>/dev/null 2>/dev/null ) then FILE=`ls $LIVEDATA/video/ | grep fglrx` if [ "$FILE" != "" ]; then insert_module $DEST $LIVEDATA/video/$FILE /tmp 1>/dev/null 2>/dev/null fi fi echo "95" && echo "Copying some modificated files..." cp /boot/vmlinuz $DEST/boot/vmlinuz cp /etc/bootsplash/themes/initrd $DEST/boot/initrd cp /etc/X11/xorg.conf $DEST/etc/X11 cp /etc/login.defs.ie $DEST/etc/login.defs rm -rf $DEST/mnt/live sleep 2 echo "95" && echo "Saving modificated files (configsave)..." if [ "$CONFIG_SAVE" == "SAVE" ]; then config_save; fi sleep 2 echo "96" && echo "Fixating the FSTAB for mount points..." fixfstab sleep 2 echo "96" && echo "Configuring default language..." configure_lang sleep 2 echo "97" && echo "Configuring default level mode..." configure_init sleep 2 echo "98" && echo "Configuring default video mode..." configure_mode sleep 2 echo "99" && echo "Reparing and fixating partition..." repairdest last sleep 2 zenity --question --text "Do you wish to reinstall LILO (Linux Boot Loader)?" if [ $? -eq 0 ] then gtki_lilo else continue fi echo "100" echo "Finished all install process" } some_clean(){ for i in gomodules.txt golanguages.txt listmodules.txt listlanguages.txt livedata_found locale_added module_removed \ extra_modules list_modules install_modules base_mods modules_mods optional_mods video_mods dest_install \ install_mos selected_mods extra_mods re_paks2 re_paks modules_base modules_module modules_optional; do if [ -e /tmp/$i ]; then rm -rf /tmp/$i; fi done } command_exec(){ check_dest if [ -e /tmp/module_removed ]; then continue else getimos to_install passmodules fi } # Main # Must run before gtkDialogs checkroot create_files # gtkDialogs export USERS_DIALOG=' disabled true if true enable:NEWROOTPASS if false disable:NEWROOTPASS if true enable:R1 if false disable:R1 if true enable:R2 if false disable:R2 if true enable:NEWROOTPASS02 if false disable:NEWROOTPASS02 R1 NEWROOTPASS disabled R2 NEWROOTPASS02 disabled /usr/share/images/goinstall_accounts.png disabled true if true enable:USERID if false disable:USERID if true enable:USEPASS if false disable:USERPASS if true enable:USERGRPS if false disable:USERGRPS if true enable:U1 if false disable:U1 if true enable:U2 if false disable:U2 if true enable:U3 if false disable:U3 U1 USERID disabled U2 USERPASS disabled U3 USERGRPS disabled disabled disabled disabled ' export PROGINST_DIALOG=' install_mos some_clean PROGINST_DIALOG FINAL_DIALOG ' export FINAL_DIALOG=' /usr/share/images/goinstall_image03.jpg disabled disabled disabled ' export MAIN_DIALOG=' disabled getpoints DEST enabled disabled disabled /usr/share/pixmaps/filetype_22.png FSTYPE ext3 reiserfs xfs /usr/share/pixmaps/edit-delete.png FORMAT Completely Format Partition Delete Files (Do NOT Format Partition) Check & Repair Partition (Do NOT Format) DO NOTHING /usr/share/pixmaps/configsave_22.png CONFIG_SAVE SAVE SAVE NOT SAVE /usr/share/pixmaps/runlevel_22.png LEVEL Multiuser Mode (3) Multiuser Mode (3) Single Mode (1) X11 KDM/GDM/XDM (4) /usr/share/pixmaps/preferences-desktop-locale.png LANG English English Portuguese French Deutsch Spanish disabled /tmp/help_3 HELP_2 395125 disabled progress_fast '