#!/bin/bash ################################################################################# # This is BinToo Installation Script written by: # # Mohamed M. Hagag # # This Script is Free Software that means you can USE,COPY,DISTRIBUTE,MODIFI # # it without permession, to know more please read GNU GPL which this script # # released under its terms . # ################################################################################# #####VARS####### export TRGT="/tmp/trgt" export DIALOG="`which dialog` --backtitle BinToo-2007.1_Install_Script:" export INSPATH="/tmp/installer" export RES="$INSPATH/res" export LOG="$INSPATH/log" export SRC="/tmp/src/" export PKGCD="bintoo-2007.1-dvd.iso" ################# #####Functions#### die(){ beep -l1000 $DIALOG --msgbox "$1, setup terminated :(." 20 60 && \ reboot exit } mktmps(){ umount /mnt/* &>/dev/null killall -9 cupsd crond fstab-update &>/dev/null modprobe pcspkr &>/dev/null rm -rf $RES $LOG $stdout &>/dev/null mkdir -p $INSPATH $TRGT $SRC &>/dev/null || die "could not create tmp/* folders" mkdir -p $RES $LOG &>/dev/null } welcome(){ beep $DIALOG --title "Welcome to BinToo-2007.1 Installation Script" --msgbox "BinToo is a full, Binary and Gentoo Based GNU/Linux Distribution for General/Special use cases like: \n 1-Desktop \n 2-Server \n 3-Workstation \n 4-Research & Development \nBinToo comes with more than 2400 pre-built applications & system tools for administrators & an \n this script will guide you through the process of the installation. \n to continue press Enter or CTRL+C to Exit or ALT+CTRL+DEL to restart. " 20 60 beep $DIALOG --title "Important notes" --msgbox "Please Read these Notes carefully: \n -You should know that this script can only install BinToo on the FIRST Hard Disk which must be Primary Master (hda) or (sda) for SATA \n -Some Dialogs will need you to select your choice by pressing Space then press Enter to continue. \n -The choosen installation Drive will be formated and any data on it will be lost. \n -You should have a SWAP drive but it is not a must." 20 60 beep $DIALOG --title "Help Needed" --msgbox "BinToo is free Software Project and i'm doing all the work in this Project alone, \n i need help in: \n -BinToo's Web site Development \n -Building packages \n -Providing versions to other Platforms like AMD64 \n -Hosting the packages Repository & the Distro. ISOs \n -Update this Installer \n -Spread the Word \nYou may have to know that BinToo is being built on my PIII/1.2G/256k and 256M RAM home PC :) \nIf you need to help or donate some money or your old PC \n please contact me [mohamedhagag1981@gmail.com]" 20 60 } setrootpart(){ partit(){ fdisk -l &>$RES/partitions.res && md5sum $RES/partitions.res &>$RES/befor.md5.res $DIALOG --yesno "Do you want to run FDisk utility? \n you may need it to delete/create/resize partitions \n you do not need it to format your drives \n you can restart now and use any other partitionning tool \n on any other opreating system then rerun setup and skip this step." 20 60 && \ cfdisk `fdisk -l | grep ^/dev/..a | grep -v -i ext | head -n1 | awk {'print $1'} | sed "s,[0-9].*,,g" ` return $? } chkparts(){ fdisk -l &>$RES/partitions.res md5sum -c $RES/befor.md5.res || die "Partition table changed successfully and the system will reboot now to apply changes" } beep partit && chkparts $DIALOG --msgbox "in The following dialog you must select root partition by pressing SpaceBar" 20 60 until [[ -s $RES/rootpart.res ]];do beep $DIALOG --radiolist "select root partition:" 0 0 0 `fdisk -l | grep ^/dev/..a | grep -v -i ext | grep -v -i swap | awk '{print $1}' | sed "s:$: partition off:g"` 2>$RES/rootpart.res done cat $RES/rootpart.res | sed "s:[0-9].*::g" > $RES/rootdisk.res || die cat $RES/rootpart.res | sed "s:/dev/::g" | sed "s:^...::g" > $RES/rootpartno.res || die clear; $DIALOG --infobox "Formatting .." 20 60 umount -f `cat $RES/rootpart.res` &>/dev/null swapoff `cat $RES/rootpart.res` &>/dev/null parted `cat $RES/rootdisk.res` mkfs `cat $RES/rootpartno.res` ext2 &>/dev/null || \ die "could not format root drive" parted `cat $RES/rootdisk.res` set 1 boot on &>/dev/null || \ die "could not set root drive bootable" sleep 3 && mkfs.ext3 -b 2048 -L BinToo-2007 `cat $RES/rootpart.res` &>/dev/null || \ mkfs.ext3 -L BinToo-2007 `cat $RES/rootpart.res` &>/dev/null || \ die "could not make file system" mount `cat $RES/rootpart.res` $TRGT } installbase(){ $DIALOG --infobox "installing the base system..." 20 60 #ToDO #$DIALOG --infobox "installing portage tree..." 0 0 #pv files/portage-0.3.tbz2 | tar -jxC $TRGT/usr/ || die "could not install portage tree" [[ -f $SRC/base.tgz ]] || die "could not install base system" insbase(){ pv -n $SRC/base.tgz | tar -zxpC $TRGT/ } insbase 2>$RES/baseprcnt.res & sleep 5 while (ps -A | grep pv | grep -v grep &>/dev/null); do tail -n1 $RES/baseprcnt.res | $DIALOG --title "Installing Base System Files:" --guage "Percent Completed:" 20 60 sleep 5 done rm $RES/baseprcnt.res rm $TRGT/etc/mtab } settimezone(){ beep $DIALOG --yesno "do you use UTC Time Zone ? Windows users should say no" 20 60 && \ (cp -f /usr/share/zoneinfo/UTC /etc/localtime) || \ (until [[ -s $RES/tz.res ]]; do beep $DIALOG --msgbox "in The following dialog you must select your TimeZone by pressing SpaceBar" 20 60 $DIALOG --radiolist "select time zone" 0 0 0 `find /usr/share/zoneinfo/posix/ -type f | sed "s,/usr/share/zoneinfo/posix/,,g" | sed "s,$, Time off,g" | sort | uniq` 2>$RES/tz.res && cp -f /usr/share/zoneinfo/posix/`cat $RES/tz.res` /etc/localtime && \ sed -i -e "s,.*CLOCK=.*,CLOCK=\"local\",g" /etc/conf.d/clock done) #cp files/clock.lcl /etc/conf.d/clock) } setusers(){ beep $DIALOG --msgbox "now you must Enter the new root password" 20 60 clear echo -e "\a" passwd beep $DIALOG --inputbox "now you should Enter a new user name:" 20 60 2> $RES/uname.res useradd -m -g wheel -u1000 `cat $RES/uname.res ` for x in audio video cdrom cdrw floppy tty dialout plugdev games do gpasswd -a `cat $RES/uname.res ` $x &>/dev/null done beep $DIALOG --msgbox "now you should Enter the ` cat $RES/uname.res ` user password" 20 60 clear echo -e "\a" passwd `cat $RES/uname.res ` } setdatentime(){ beep $DIALOG --msgbox "In the following Dialog use TAB and Arrows to adjust Date and Time then press Enter to continue." 20 60 $DIALOG --calendar "select date:" 0 0 `date +%d %m %Y` 2> $RES/date.res date -s `cat $RES/date.res | sed "s:/: :g" | awk '{print $2 "/" $1 "/" $3}'` &>/dev/null $DIALOG --timebox "set the current time" 0 0 `date +%H%M%S` 2> $RES/time.res date -s `cat $RES/time.res` &>/dev/null hwclock -w } selectpkgs(){ beep docustom(){ $DIALOG --msgbox "In the following Dialog you must select packages by pressing spacebar then press Enter to continue." 20 60 until [[ -s $RES/pkgs.res ]];do beep $DIALOG --separate-output --checklist "Select programs to install" 0 0 0 `cat /var/lib/portage/world.new | grep -v realplayer | sort | uniq | sed "s,$, package off,g"` 2> $RES/pkgs.res done echo -e "alsa-utils mesa-progs pcmcia " >> $RES/pkgs.res #some important tools cat $RES/pkgs.res | grep gnome &>/dev/null && \ echo -e "gkrellm gkrellm-themes gnome-system-tools nautilus-cd-burner nautilus-open-terminal nautilus-sendto hal-device-manager porthole config_confd profuse gnomebaker gnome-bluetooth mozilla-firefox gaim gnome-themes gnome-themes-extras" >> $RES/pkgs.res cat $RES/pkgs.res | grep kde &>/dev/null && \ echo -e " knemo kdebluetooth knetworkconf kwifimanager kuroo k3b konq-plugins gtk-engines-qt kdeartwork-meta" >> $RES/pkgs.res } dofull(){ cat /var/lib/portage/world.new |sort | uniq > $RES/pkgs.res } dobasic(){ echo -e "gkrellm gkrellm-themes alsa-utils mesa-progs pcmcia gnome kde-meta gnome-system-tools nautilus-cd-burner nautilus-open-terminal nautilus-sendto hal-device-manager porthole config_confd profuse gnomebaker gnome-bluetooth mozilla-firefox gaim gnome-themes gnome-themes-extras knemo kdebluetooth knetworkconf kwifimanager kuroo k3b konq-plugins gtk-engines-qt kdeartwork-meta wine gimp inkscape blender k3d bittorrent ktorrent amule kmobiletools scite gvim emacs bzflag supertux webmin usermin openoffice klamav gparted samba dmapi vlc arabeyes-fonts intlfonts kacst-fonts lfpfonts-fix lfpfonts-var font-arabic-misc farsi-fonts font-bitstream-75dpi font-bitstream-100dpi font-bitstream-speedo ttf-bitstream-vera ttf-sil-arabicfonts" >$RES/pkgs.res } domini(){ echo -e "squid dansguardian clamav apache php virtual/mysql samba sendmail shorewall webmin cacti quagga phpmyadmin iproute2 iptables ipsec-tools gamin dmapi postgresql bind dhcp" >$RES/pkgs.res } until [[ -s $RES/prfl.res ]]; do $DIALOG --radiolist "Select installation Profile, These are the available profiles and the required free space on the target drive" 0 0 0 \ 1-Full "Recommended 12GB 8h" on \ 2-Basic "Desktop 6GB 4h" off \ 3-Minimal "Shell,Server 3GB 2h" off \ 4-Custom "experts only" off 2>$RES/prfl.res done case `cat $RES/prfl.res` in 1-Full) dofull;; 2-Basic) dobasic;; 3-Minimal) domini;; 4-Custom) docustom;; esac } installpkgs(){ $DIALOG --infobox "Preparing installation of selected packages..." 20 60 #fix some issues: rm -rf /usr/local/portage/app-emulation/qemu* &>/dev/null #remove unneeded ebuild rm -rf /usr/local/portage/media-gfx/k3d/ &>/dev/null #make sure that PKGDIR has the default value sed -i -e "s,^PKGDIR,#PKGDIR,g" -e "s,^DISTDIR,#DISTDIR,g" -e "s,^FEATURES,#FEATURES,g" /etc/make.conf #end fix domerge(){ nice -n-5 emerge -k `cat $RES/pkgs.res | grep -v grub | grep -v "gdm-themes$" | grep -v '^$'` || \ until nice -n-5 emerge --resume --skipfirst; do nice -n-5 emerge --resume --skipfirst; done } #getprcnt() { #expr `tail -n7500 $LOG/merge.log | grep 'Emerging ' | awk {'print $3'} | sed "s,(,,g" | tail -n1 `00 / `tail -n7500 $LOG/merge.log | grep 'Emerging ' | awk {'print $5'} | sed "s,),,g" | tail -n1 ` #} getprcnt(){ TOTAL=`head -n10000 $LOG/merge.log | grep 'Emerging ' | head -n1 | awk {'print $5'} | sed "s,),,g"` SUBDONE=`tail -n10000 $LOG/merge.log | grep 'Emerging ' | tail -n1 | awk {'print $3'} | sed "s,(,,g"` SUBTOT=`tail -n10000 $LOG/merge.log | grep 'Emerging ' | tail -n1 | awk {'print $5'} | sed "s,),,g"` export REM=`expr $SUBTOT - $SUBDONE` DONE=`expr $TOTAL - $REM ` PRCNT=`expr $DONE \* 100 / $TOTAL` echo $PRCNT } # getrem(){ # expr `tail -n7500 $LOG/merge.log | grep 'Emerging ' | awk {'print $5'} | sed "s,),,g" | tail -n1 ` - `tail -n7500 $LOG/merge.log | grep 'Emerging ' | awk {'print $3'} | sed "s,(,,g" | tail -n1 ` # } domerge &> $LOG/merge.log & touch $LOG/merge.log sleep 10 echo 0 > $RES/prcnt.res while (ps -A |grep emerge | grep -v grep &>/dev/null); do getprcnt &>$RES/prcnt.res #getrem &>$RES/rempkgs.res cat $RES/prcnt.res | $DIALOG --title "Installing `tail -n10000 $LOG/merge.log | grep 'Emerging ' | tail -n1 | awk {'print $6'} `" --gauge " This process may take up to 8 hours depending on your selection of packages and your PC hardware, you may go sleep now or do some shopping or any thing else instead of watching this e... process.\n WARNING: DO NOT run any graphical Desktop or any application as it will increase the installation time for ex. from 8 to 20 hours just leave the installation screen active and go for a lot of time :). \n Don't forget to visit http://bintoo.sf.net for more information about installing non-free software like Java,Flash-plugin,Realplayer and propritery drivers. \n\nThere're ${REM} Packages Remainning. \n\nTotal completed: " 25 60 sleep 10 done mv /wget /usr/bin/ sed -i -e "s,FEATURES=\",FEATURES=\"buildpkgs ,g" /etc/make.conf beep -l1000 } setservices(){ #set base boot svcs: $DIALOG --infobox "Installing basic services to the Boot Runlevel..." 20 60 for x in hald alsasound devices syslog-ng net.eth0 do rc-update -a $x boot &>/dev/null done #set base default svcs: $DIALOG --infobox "Installing basic services to the Default Runlevel..." 20 60 for x in acpid cupsd samba gpm buildfstab xdm sshd numlock do rc-update -a $x default &>/dev/null done ls -1 /etc/init.d/ > /tmp/svc.lst beep $DIALOG --separate-output --checklist "Select Startup services:" 0 0 0 `cat /tmp/svc.lst | sed "s:$: service off:g"` 2>$RES/svc.res for x in `cat $RES/svc.res ` do [[ -f /etc/runlevels/boot/$x ]] || rc-update -a $x default &>/dev/null done } setgrub(){ $DIALOG --infobox "installing grub to MBR..." 20 60 grub-install --no-floppy --recheck --root-directory=/ `cat $RES/rootpart.res | sed "s:[0-9]*::g"`&>/dev/null || \ $DIALOG --infobox "generating boot menu \"menu.lst\"..." #genmenulst export ROOTPART=`cat $RES/rootpart.res` GRBPART=`expr \`echo $ROOTPART | sed "s:/dev/::g" | sed "s:^...::g"\` - 1` GRB_DSK="0" echo -e "root (hd$GRB_DSK,$GRBPART) \n setup (hd0) " | grub || die "could not install GRUB" cat </boot/grub/menu.lst default 0 timeout 30 splashimage=(hd$GRB_DSK,$GRBPART)/boot/grub/splash.xpm.gz title BinToo "$ROOTPART" kernel (hd$GRB_DSK,$GRBPART)/boot/vmlinuz root=$ROOTPART quiet udev vga=791 splash=silent,theme:bintoo-2007 CONSOLE=/dev/tty1 initrd (hd$GRB_DSK,$GRBPART)/boot/initrd title BinToo "$ROOTPART" noSplash noVGA kernel (hd$GRB_DSK,$GRBPART)/boot/vmlinuz root=$ROOTPART quiet udev EOF DISK=`cat $RES/rootpart.res | sed "s,[0-9].*,,g"` for x in `fdisk -l | grep -v -i 'swap' | grep -i -v 'ext' | grep -i -v 'fat' | grep -v $ROOTPART | awk {'print $1'} | grep $DISK | sed "s,/dev/,,g"` do mkdir -p /tmp/$x && mount /dev/$x /tmp/$x [[ -d /tmp/$x/boot ]] && cat /tmp/$x/boot/grub/menu.lst | grep -v default | grep -v timeout >> /boot/grub/menu.lst || cat /tmp/$x/boot/grub/grub.conf | grep -v default | grep -v timeout >> /boot/grub/menu.lst done ( fdisk -l | grep 'a1 ' | grep -i fat || fdisk -l | grep 'a1 ' | grep -i ntfs ) && \ cat <>/boot/grub/menu.lst title Windows root (hd0,0) chainloader +1 EOF [[ -d /boot/memtest86plus ]] && \ cat <>/boot/grub/menu.lst title MemoryTester kernel (hd$GRB_DSK,$GRBPART)/boot/memtest86plus/memtest.bin EOF } dochroot(){ umount $TRGT/dev &>/dev/null umount $TRGT/dev &>/dev/null umount $TRGT/dev &>/dev/null mount -o bind /dev $TRGT/dev/ || die "could not mount dev on target" umount $TRGT/proc &>/dev/null umount $TRGT/proc &>/dev/null umount $TRGT/proc &>/dev/null mount -o bind /proc $TRGT/proc/ || die "could not mount proc on target" mkdir -p $TRGT/$INSPATH || die "could not make $INSPATH dir" umount $TRGT/$INSPATH &>/dev/null umount $TRGT/$INSPATH &>/dev/null umount $TRGT/$INSPATH &>/dev/null mount -o bind $INSPATH $TRGT/$INSPATH || die "could not mount $INSPATH on target" chroot $TRGT /usr/bin/setup || die "could not start part2 of setup" beep -l1000 $DIALOG --msgbox "setup finished, and the system will now reboot :) ." 10 60 && reboot } findimg(){ for x in `fdisk -l | grep '^/dev/' | grep -v Ext | grep -v swap | grep -v '^$' | awk {'print $1'} | sed "s:/dev/::g" ` do $DIALOG --infobox "finding Installation image on ${x}..." 0 0 #umount -f /tmp/${x} &>/dev/null ( mkdir -p /tmp/${x} &>/dev/null || $DIALOG --infobox "could not make mount dir for ${x}..." 0 0 ) && \ ( mount /dev/${x} /tmp/${x} &>/dev/null || $DIALOG --infobox "could not mount ${x}..." 0 0 ) && \ [[ -f /tmp/${x}/$PKGCD ]] && echo "/tmp/${x}/${PKGCD}" > $RES/pkgcd.res && break || \ umount -f /tmp/${x} &>/dev/null done if ! [[ -f $RES/pkgcd.res ]] then for x in cdrom dvd do $DIALOG --infobox "finding Installation image on ${x}..." 0 0 mkdir -p /tmp/$x &>/dev/null mount /dev/$x /tmp/$x &>/dev/null [[ -d /tmp/$x/packages ]] && export DVD=0 && \ echo "/tmp/$x" > $RES/pkgcd.res && break || \ umount -f /tmp/$x done fi if ! [[ -f $RES/pkgcd.res ]] then $DIALOG --msgbox "could not find the $PKGCD on any dirve :(\n\ you should download it and put it on any partition \n\ and do not put it in any folder just on the root of any part.\n\ Setup will exit now " 0 0 die "could not find $PKGCD :(" fi } mountimg(){ if [[ $DVD = "0" ]] then mount -o bind `cat $RES/pkgcd.res` $SRC || die "could not mount packages dir from the DVD" else mount -o loop `cat $RES/pkgcd.res` $SRC &>/dev/null || die "could not mount $PKGCD" fi } mountpkgs(){ mkdir -p $TRGT/usr/portage/packages &>/dev/null [[ -d $SRC/packages ]] && mount -o bind $SRC/packages $TRGT/usr/portage/packages &>/dev/null || \ die "could not find packages" } buildfstab(){ #cat $FILES/fstab.in | sed "s,@ROOT@,$ROOTPART,g" > $TRGT/etc/fstab.in ROOTPART=`cat $RES/rootpart.res` cat </etc/fstab.in # # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/fd0 /mnt/floppy auto noauto,user,users,exec 0 0 /dev/cdrom /mnt/cdrom auto noauto,user,users,exec 0 0 # NOTE: The next line is critical for boot! proc /proc proc defaults 0 0 tmpfs /dev/shm tmpfs defaults,size=256m 0 0 # normal partitions. $ROOTPART / auto defaults 0 0 EOF cp /etc/fstab.in /etc/fstab &>/dev/null /etc/init.d/buildfstab restart &>/dev/null mount -o remount,rw `cat $RES/rootpart.res` / } setnetwork(){ beep $DIALOG --inputbox "Enter the host name for this box:" 0 0 2>$RES/hostname.res HOSTNAME=`cat $RES/hostname.res` [[ -s $RES/hostname.res ]] && \ echo -e "HOSTNAME=\"$HOSTNAME\"" > /etc/conf.d/hostname && \ sed -i -e "s,localhost,localhost $HOSTNAME,g" /etc/hosts && \ sed -i -e "s,.*netbios name =.*,netbios name = $HOSTNAME,g" /etc/samba/smb.conf $DIALOG --yesno "Do you want to configure network manually ?\n you can adjust it after installation using gnome [network-admin] or KDE [kcontrol] tools . " 20 60 && \ $DIALOG --inputbox "Enter the IP addres of this box:" 0 0 2>$RES/ip.res && \ $DIALOG --inputbox "Enter the Netmask addres :" 0 0 2>$RES/netmask.res && \ $DIALOG --inputbox "Enter the Gateway:" 0 0 2>$RES/gateway.res && \ $DIALOG --inputbox "Enter the DNS address:" 0 0 2>$RES/dns.res && \ echo -e "config_eth0=(\"`cat $RES/ip.res ` netmask `cat $RES/netmask.res `\")" >/etc/conf.d/net && \ echo -e "routes_eth0=(\"default via `cat $RES/gateway.res `\")" >>/etc/conf.d/net && \ echo "nameserver `cat $RES/dns.res`" > /etc/resolv.conf } setdm(){ [[ -f /usr/bin/gdm ]] && \ ( sed -i -e "s,=\"xdm\",=\"gdm\",g" /etc/conf.d/xdm &>/dev/null && \ sed -i -e "s,.*XSESSION=.*,XSESSION=\"Gnome\",g" /etc/rc.conf &>/dev/null ) || \ ( sed -i -e "s,=\"xdm\",=\"kdm\",g" /etc/conf.d/xdm &>/dev/null && \ sed -i -e "s,.*XSESSION=.*,XSESSION=\"Gnome\",g" /etc/rc.conf &>/dev/null ) } setlocale(){ echo -e 'LC_ALL="en_US.UTF-8" \nLANG="en_US.UTF-8"' >/etc/env.d/02locale source /etc/profile; env-update } setgen2(){ #make.conf cat < $TRGT/etc/make.conf ######################################### Don't modifiy until u know ######################################### CFLAGS="-Os -mtune=i486 -pipe -fomit-frame-pointer" CHOST="i486-pc-linux-gnu" CXXFLAGS="\${CFLAGS}" MAKEOPTS="-j2" ACCEPT_KEYWORDS='~x86' PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentopia/" #PORT_LOGDIR=/var/log/portage FEATURES='buildpkg parallel-fetch' USE="-* nvidia fgrlx aiglx dmx cursors gdm icons libsamplerate ares metalink bittorrent ace cpio compress 3dfx 3dnow 7zip X Xaw3d a52 aac aalib accessibility acl acpi activefilter ada addbookmarks alias alsa amr amuled aol apache2 apm artworkextra asf async atk atm audacious automount autoreplace avahi avi bash-completion batch bcp beagle berkdb bidi big-tables bitmap-fonts bjam blender-game bluetooth bonobo boost browserplugin buttons bzip2 cairo calendar caps cardbus cdb cdda cddb cdio cdparanoia cdr cgi chardet chm cjk clamav clanVoice cli command-args connectionstatus contactnotes corba cpudetection crypt cscope ctrlmenu ctype cups curl curlwrappers dar32 db dba dbm dbus dga dhcp dio directfb djvu dlloader dlz dmi dnd dri dts dv dvb dvd dvdr dvdread dvi ecc edl eds effects elf elibc_glibc emacs emboss encode enigmail epson esd ethereal etwin exif expat extraengine fam fastcgi fat fax fbcon fbdev ffmpeg firefox flac flash flatfile font-server fontconfig foomaticdb fortran fpx freetts freewnn ftp fuse gadu gaim gcj gd gdbm geoip ggi gif gimp gimpprint glut gmp gnokii gnome gnomecanvas gnomedb gnustep gnutls gpgme gphoto2 gpm gps graphviz groupwise gs gstreamer gtk gtk2 gtkhtml guile gvim h323 hal hddtemp hfs highlight history howl i8x0 iconv icq idn ieee1394 imagemagick imap imlib2 inifile inkjar innodb iodbc ipalias ipv6 irc irda irmc isdnlog ithreads jabber jack java java-external javascript jfs jingle jikes joystick jpeg jpeg2k kde kerberos kernel_linux kqemu krb4 l7filter ladspa lcms ldap leim libcaca libclamav libg++ libgda libwww lirc live lm_sensors logitech-mouse logrotate lua lzo mad madwifi mailwrapper matroska mbrola md5sum mdb memlimit mhash mikmod mime ming mjpeg mmap mmx mng mod modplug mono motif mozdevelop mp3 mp4 mpeg mpeg123 mplayer mppe-mppc msn mule multipath musepack musicbrainz mysql mysqli nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh nas nautilus ncurses ndiswraper netmeeting network nfs ngui nis nls nntp noamazon nowlistening nptl nptlonly nsplugin nspr ntfs objc odbc ofx ogg oggvorbis on-the-fly-crypt openal openexr opengl oss pam pam_console pango panel-plugin pascal pcmcia pcntl pcre pda pdf pdflib perl php pic povray plib plugin plx png pnp pop pop3 portaudio posix postgres ppds pppd prelude print psyco pthreads pyste python qemu-fast qmail qt qt3 qt4 quicktime quota quotas radiotap radius rar rdesktop readline real reflection reiser4 reiserfs rplay rpm rrdcgi rtc ruby samba sametime sasl scanner scim screen sdk sdl seamonkey sensord serial server session sguil shout silc silverxp simplexml skey skins slang slp smartcard smime smp sms smux sndfile snmp snortsam soap sockets socks5 softmmu softquota sox spamassassin speex spell spl spreadsheet sql sqlite sqlite3 sse sse2 ssl statistics stencil-buffer stream stroke subversion svg svga swat sysfs syslog syslog-ng szip tcl tcltk tcpd tetex texteffect theora threads threadsonly thumbnail thunar-vfs tidy tiff timidity tk tokenizer toolbar tools translator truetype truetype-fonts type1-fonts udev underscores unicode ups urandom usb userland_GNU userlocales utf8 v4l v4l2 vcd vhosts vim-pager virus-scan visualization vlm vnc vorbis wddx webpresence wifi win32codecs winbind winpopup wma wma123 wmf wv wxwindows x11vnc x86 xcomposite xfs xine xinerama xinetd xml xml2 xmlreader xmlrpc xmlwriter xorg xosd xpm xprint xrandr xscreensaver xsl xvid yahoo zeroconf zip zlib" INPUT_DEVICES="keyboard mouse acecad aiptek digitaledge elographics evdev fpit hyperpen jamstudio joystick magellan mutouch palmax spaceorb summa synaptics tek4957 ur98 void wacom" VIDEO_CARDS="vga vesa apm ark chips cirrus cyrix dummy epson fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l via vmware voodoo" #LIRC_DEVICES="all" #LINGUAS="af ar de en fa fr" ############################################################################################# #DISTDIR="" #PKGDIR="" #GENTOO_MIRRORS="" #PORTAGE_BINHOST="" #FETCHCOMMAND="/usr/bin/aria2c -s2 -d \${DISTDIR} \${URI} " #RESUMECOMMAND="/usr/bin/aria2c -s2 -d \${DISTDIR} \${URI} " #FETCHCOMMAND='/usr/bin/proz --no-getch -fr \${URI} -P \${DISTDIR}' #RESUMECOMMAND='/usr/bin/proz --no-getch -fr \${URI} -P \${DISTDIR}' EOF #etc-update $DIALOG --msgbox "In the following you must type (-5) to update the system configuration files or after installation run etc-update as root." clear etc-update generate-modprobe.conf &> /dev/null depmod -a &> /dev/null ; modules-update &>/dev/null source /etc/profile; env-update #Default Themes [[ -d /usr/share/themes/Clearlooks ]] && rm -rf /usr/share/themes/Default && \ ln -s /usr/share/themes/Clearlooks /usr/share/themes/Default [[ -d /usr/share/cursors/xorg-x11/Industrial ]] && \ ln -s /usr/share/cursors/xorg-x11/Industrial /usr/share/cursors/xorg-x11/default } fixpkgs(){ #k3d cat $RES/pkgs.res | grep k3d &>/dev/null && \ ln -s /usr/lib/libboost_date_time-mt.a /usr/lib/libboost_date_time.a && \ ln -s /usr/lib/libboost_date_time-mt.so /usr/lib/libboost_date_time.so && \ ln -s /usr/lib/libboost_date_time-mt.so /usr/lib/libboost_date_time.so.1.33.1 && \ ln -s /usr/lib/libboost_regex-mt.a /usr/lib/libboost_regex.a && \ ln -s /usr/lib/libboost_regex-mt.so /usr/lib/libboost_regex.so && \ ln -s /usr/lib/libboost_regex-mt.so /usr/lib/libboost_regex.so.1.33.1 && \ ln -s /usr/lib/libboost_filesystem-mt.a /usr/lib/libboost_filesystem.a && \ ln -s /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_filesystem.so && \ ln -s /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_filesystem.so.1.33.1 #ntfs in buildfstab & fude module sed -i -e "s/0,noauto/0,locale=ar_EG.utf8,uid=1000/g" /etc/init.d/buildfstab echo "fuse" >> /etc/modules.autoload.d/kernel-2.6 #sudo echo 'root ALL=(ALL) ALL' > /etc/sudoers echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers } part1(){ mktmps welcome findimg mountimg setdatentime setrootpart installbase cp /usr/bin/setup $TRGT/usr/bin/ &>/dev/null touch /tmp/part1.ok &>/dev/null touch $TRGT/tmp/part1.ok &>/dev/null mountpkgs dochroot } part2(){ buildfstab source /etc/profile; env-update; mount -a settimezone selectpkgs installpkgs setusers setnetwork setgen2 setgrub setservices setdm setlocale fixpkgs buildfstab #an evil removes smb.conf so be sure that smb.conf is there [[ -f /etc/samba/smb.conf ]] || \ cat /etc/samba/smb.conf.example | sed "s,.*netbios name =.*,netbios name = $HOSTNAME,g" >//etc/samba/smb.conf ######## exit } ######START######## [[ -f /tmp/part1.ok ]] && part2 || part1 ######ToDo######### #31-12-2006 14:18