if test -e /mnt/target; then TARGET=/mnt/target else TARGET="" fi KNOPPIXLOG=$TARGET/root/knoppix.installation.files if test -e $KNOPPIXLOG; then echo $KNOPPIXLOG exists already... else mkdir -p $KNOPPIXLOG cd $KNOPPIXLOG wget -r -np http://godot.studentenweb.org/debian/knoppix cp -a $TARGET/etc/apt/sources.list original.sources.list dpkg --get-selections >> original.dpkg.selections tar -czvf original.etc.skel.tgz $TARGET/etc/skel fi # the following trick solves the dynamic nmap problem of apt-get update sed s/10000000/100000000/ $TARGET/etc/apt/apt.conf > $TARGET/etc/apt/apt.conf.updated mv -f $TARGET/etc/apt/apt.conf.updated $TARGET/etc/apt/apt.conf sed s/"lang=de"/"lang=us ramdisk_size=129000 dma"/ $TARGET/etc/lilo.conf | sed s/"^install=bmp"/"install=menu"/ | sed s/timeout=50/'timeout=150 \# used to be timeout=50'/ > $TARGET/etc/lilo.conf.updated mv -f $TARGET/etc/lilo.conf.updated $TARGET/etc/lilo.conf sed s/'ro_RO ISO-8859-2'/'\#ro_RO ISO-8859-2 \# commented out as it causes non-trivial problems'/ < $TARGET/etc/locale.gen > $TARGET/etc/locale.gen.updated mv -f $TARGET/etc/locale.gen.updated $TARGET/etc/locale.gen mkdir -p $TARGET/usr/lib/mozilla-cvs/plugins # necessary to avoid dselect problems chmod a+r $TARGET/dev/scd0 # makes your cdrom/dvd available to everybody mkdir -p $TARGET/etc/skel/.icewm mkdir -p $TARGET/etc/skel/.opera mkdir -p $TARGET/etc/skel/.hotkeys mkdir -p $TARGET/etc/default mkdir -p $TARGET/etc/network mkdir -p $TARGET/etc/apt mkdir -p $TARGET/usr/X11R6/include/X11/bitmaps mkdir -p $TARGET/usr/local/bin lynx -source http://godot.studentenweb.org/debian/knoppix/etc/apt/selections.smartcard > $TARGET/root/packages.finalize.debian.installation.smartcard.selections lynx -source http://godot.studentenweb.org/debian/knoppix/etc/apt/selections > $TARGET/root/packages.finalize.debian.installation.default.selections KERNELVERSION=-`uname -r` if test -e $TARGET/etc/modules$KERNELVERSION then echo -n else KERNELVERSION="" fi echo ehci-hcd >> $TARGET/etc/modules$KERNELVERSION # enables usb 2.0 devices to provide high-speed data transfer echo usb-storage >> $TARGET/etc/modules$KERNELVERSION # generic usb support for storage devices (usb/firwire hard disks, tape drives,...) echo -n looking for firewire... if grep -i firewire /proc/pci > /dev/null;then echo bingo... loading firewire modules echo ieee1394 >> $TARGET/etc/modules$KERNELVERSION # FireWire protocol echo ohci1394 >> $TARGET/etc/modules$KERNELVERSION # Open Host Controller Interface echo raw1394 >> $TARGET/etc/modules$KERNELVERSION # Serial Bus Protocol-2 lynx -source http://godot.studentenweb.org/debian/knoppix/usr/local/bin/rescan-scsi-bus > $TARGET/usr/local/bin/rescan-scsi-bus.sh # SCSI bus rescanning tool chmod a+x $TARGET/usr/local/bin/rescan-scsi-bus.sh echo /usr/local/bin/rescan-scsi-bus.sh >> $TARGET/etc/init.d/bootmisc.sh else echo no firewire found fi echo if grep usbdevfs $TARGET/etc/fstab > /dev/null then echo fstab already mounts /proc/bus/usb else lynx -source http://godot.studentenweb.org/debian/knoppix/etc/fstab >> $TARGET/etc/fstab mount -a fi if grep eth0 $TARGET/etc/network/interfaces > /dev/null then echo eth0 exists already in $TARGET/etc/network/interfaces else lynx -source http://godot.studentenweb.org/debian/knoppix/etc/network/interfaces >> $TARGET/etc/network/interfaces fi #if grep eth1 $TARGET/etc/network/interfaces > /dev/null #then # echo eth1 exists already in $TARGET/etc/network/interfaces #else # lynx -source http://godot.studentenweb.org/debian/knoppix/etc/network/interfaces|sed s/0/1/g >> $TARGET/etc/network/interfaces #fi lynx -source http://godot.studentenweb.org/debian/knoppix/etc/default/ntpdate > $TARGET/etc/default/ntpdate lynx -source http://godot.studentenweb.org/debian/knoppix/etc/ntp.conf > $TARGET/etc/ntp.conf lynx -source http://godot.studentenweb.org/debian/knoppix/etc/apt/preferences > $TARGET/etc/apt/preferences lynx -source http://godot.studentenweb.org/debian/knoppix/etc/apt/sources.list > $TARGET/etc/apt/sources.list lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/bash_history > $TARGET/etc/skel/.bash_history lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/bash_profile > $TARGET/etc/skel/.bash_profile lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/cccdrc > $TARGET/etc/skel/.cccdrc lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/emacs > $TARGET/etc/skel/.emacs echo echo you will now get the opportunity to select whether you wish to install the hotkeys configuration file for the following laptops: Dell Latitude d600, Compaq Evo n800c, Hp compaq nw8000: echo echo -n "Do you want to install the hotkeys configuration file for a dell inspiron/latitude-series laptop (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/hotkeys/dell/hotkeys.def > $TARGET/etc/skel/.hotkeys/hotkeys.def lynx -source http://godot.studentenweb.org/debian/knoppix/usr/local/bin/aumute > $TARGET/usr/local/bin/aumute chmod a+x $TARGET/usr/local/bin/aumute else echo echo -n "Do you want to install the hotkeys configuration file for a compaq evo laptop (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/hotkeys/compaq/hotkeys.def > $TARGET/etc/skel/.hotkeys/hotkeys.def else echo echo -n "Do you want to install the hotkeys configuration file for an hp/compaq laptop (press 'y' for yes, anything else for no, default yes)? " answer="y" read answer if [ :$answer: == :: ];then answer=y;fi if [ :$answer: == :y: ]; then lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/hotkeys/hp/hotkeys.def > $TARGET/etc/skel/.hotkeys/hotkeys.def fi fi fi echo echo -n "Do you want icewm to switch to another desktop window when moving the mouse to the screen borders (press 'y' for yes, anything else for no, default yes)? " answer="y" read answer if [ :$answer: == :: ];then answer=y;fi if [ :$answer: == :y: ]; then lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/icewm/preferences > $TARGET/etc/skel/.icewm/preferences else lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/icewm/preferences|sed s/"EdgeSwitch\=1"/"EdgeSwitch\=0"/g > $TARGET/etc/skel/.icewm/preferences fi lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/icewm/toolbar > $TARGET/etc/skel/.icewm/toolbar echo echo -n "Do you want remove the opera browser from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v opera > $TARGET/etc/skel/.icewm/toolbar fi echo echo -n "Do you want remove the netscape browser from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v netscape > $TARGET/etc/skel/.icewm/toolbar fi echo echo -n "Do you want remove the mozilla browser from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v mozilla > $TARGET/etc/skel/.icewm/toolbar fi echo echo -n "Do you want remove the konqueror browser from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v konqueror > $TARGET/etc/skel/.icewm/toolbar fi echo echo -n "Do you want remove the FireFox browser from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v firefox > $TARGET/etc/skel/.icewm/toolbar fi echo echo -n "Do you want remove the fte editor from the icewm toolbar (press 'y' for yes, anything else for no, default no)? " answer="n" read answer if [ :$answer: == :: ];then answer=n;fi if [ :$answer: == :y: ]; then cat $TARGET/etc/skel/.icewm/toolbar|grep -v fte > $TARGET/etc/skel/.icewm/toolbar fi lynx -source http://godot.studentenweb.org/debian/knoppix/usr/X11R6/include/X11/bitmaps/firefox_16x16.xpm > $TARGET/usr/X11R6/include/X11/bitmaps/firefox_16x16.xpm lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/icewm/keys > $TARGET/etc/skel/.icewm/keys lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/icewm/menu > $TARGET/etc/skel/.icewm/menu lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/joerc > $TARGET/etc/skel/.joerc lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/opera/opera6.ini > $TARGET/etc/skel/.opera/opera6.ini lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/workmanrc > $TARGET/etc/skel/.workmanrc lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/Xdefaults >> $TARGET/etc/skel/.Xdefaults lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/xmodmaprc > $TARGET/etc/skel/.xmodmaprc lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/xsession > $TARGET/etc/skel/.xsession echo echo -n "Do you want to use my pre-configuration of the kde kicker for your new users (press 'y' for yes, anything else for no, default yes)? " answer="y" read answer if [ :$answer: == :: ];then answer=y;fi if [ :$answer: == :y: ]; then lynx -source http://godot.studentenweb.org/debian/knoppix/etc/skel/kdeconfig.tgz > $TARGET/tmp/kdeconfig.tar tar -xvf $TARGET/tmp/kdeconfig.tar --directory $TARGET/etc/skel fi echo echo -n "Do you want me to disable the bash completion features (press 'y' for yes, anything else for no, default yes)? " answer="y" read answer if [ :$answer: == :: ];then answer=y;fi if [ :$answer: == :y: ]; then mv $TARGET/etc/bash_completion $TARGET/etc/bash_completion. mv $TARGET/etc/bash_completion.d $TARGET/etc/bash_completion.d. fi echo echo > $TARGET/root/finalize.debian.installation.sh echo tzconfig >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo executing lilo to enable dma, extended ramdisk size and to specify lang=us >> $TARGET/root/finalize.debian.installation.sh echo lilo >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo -n \"Do you want me to remove the knoppix user \(press \'y\' for yes, anything else for no, default yes\)\? \" >> $TARGET/root/finalize.debian.installation.sh echo answer="y" >> $TARGET/root/finalize.debian.installation.sh echo read answer >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :: \]\; then answer=y \;fi >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :y: \]\; then >> $TARGET/root/finalize.debian.installation.sh echo userdel knoppix >> $TARGET/root/finalize.debian.installation.sh echo fi >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo -n \"Do you want to select smartcard-related packages \(press \'y\' for yes, anything else for no, default yes\)\? \" >> $TARGET/root/finalize.debian.installation.sh echo answer="y" >> $TARGET/root/finalize.debian.installation.sh echo read answer >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :: \]\; then answer=y \;fi >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :y: \]\; then >> $TARGET/root/finalize.debian.installation.sh echo cat /root/packages.finalize.debian.installation.smartcard.selections \| sudo dpkg --set-selections >> $TARGET/root/finalize.debian.installation.sh echo fi >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo -n \"Do you want to install my preferred packages \(press \'y\' for yes, anything else for no, default yes\)\? \" >> $TARGET/root/finalize.debian.installation.sh echo answer="y" >> $TARGET/root/finalize.debian.installation.sh echo read answer >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :: \]\; then answer=y \;fi >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :y: \]\; then >> $TARGET/root/finalize.debian.installation.sh echo cat /root/packages.finalize.debian.installation.default.selections \| sudo dpkg --set-selections >> $TARGET/root/finalize.debian.installation.sh echo fi >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo now executing a few apt-get updates to prevent problems with dselect lateron >> $TARGET/root/finalize.debian.installation.sh echo echo each apt-get update may take some time... be patient... >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get update >> $TARGET/root/finalize.debian.installation.sh #echo sudo apt-get -y install -t unstable gimp >> $TARGET/root/finalize.debian.installation.sh #echo sudo apt-get -y install -t unstable libkdeedu1 >> $TARGET/root/finalize.debian.installation.sh ##echo sudo apt-get -y install -t unstable kdelibs4 >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get -y install -t unstable perl-suid >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get -y install -t unstable gtkam >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get -y install -t unstable libxft2 >> $TARGET/root/finalize.debian.installation.sh #echo sudo apt-get -y install -t experimental libstdc++6 >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get -y install -t experimental libgcc1 >> $TARGET/root/finalize.debian.installation.sh echo sudo apt-get -y install -t unstable libxine-dev >> $TARGET/root/finalize.debian.installation.sh #echo sudo apt-get -y install -t unstable libsasl2 >> $TARGET/root/finalize.debian.installation.sh #echo sudo apt-get -y install -t unstable apache >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo you can now specify how dselect should behave when configuring or reconfiguring debian packages, e.g., non-interactive >> $TARGET/root/finalize.debian.installation.sh echo sleep 5 >> $TARGET/root/finalize.debian.installation.sh echo sudo dpkg-reconfigure debconf >> $TARGET/root/finalize.debian.installation.sh echo sudo dselect >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo you can now respecify how dselect should behave when configuring or reconfiguring debian packages, e.g., non-non-interactive >> $TARGET/root/finalize.debian.installation.sh echo sleep 5 >> $TARGET/root/finalize.debian.installation.sh echo sudo dpkg-reconfigure debconf >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo -n \"Do you wish to start searching for ntfs partitions to mount them read/write \(press \'y\' for yes, anything else for no, default yes\)\? \" >> $TARGET/root/finalize.debian.installation.sh echo answer="y" >> $TARGET/root/finalize.debian.installation.sh echo read answer >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :: \]\; then answer=y \;fi >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :y: \]\; then >> $TARGET/root/finalize.debian.installation.sh echo wget http://godot.studentenweb.org/debian/knoppix/ntfsrw.scr >> $TARGET/root/finalize.debian.installation.sh echo time sudo sh ntfsrw.scr \& >> $TARGET/root/finalize.debian.installation.sh echo fi >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo echo -n \"Do you wish to compile and configure mplayer \(press \'y\' for yes, anything else for no, default yes\)\? \" >> $TARGET/root/finalize.debian.installation.sh echo answer="y" >> $TARGET/root/finalize.debian.installation.sh echo read answer >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :: \]\; then answer=y \;fi >> $TARGET/root/finalize.debian.installation.sh echo if \[ :\$answer: == :y: \]\; then >> $TARGET/root/finalize.debian.installation.sh echo wget http://godot.studentenweb.org/debian/knoppix/mplayer.scr >> $TARGET/root/finalize.debian.installation.sh echo time sudo sh mplayer.scr >> $TARGET/root/finalize.debian.installation.sh echo fi >> $TARGET/root/finalize.debian.installation.sh echo echo >> $TARGET/root/finalize.debian.installation.sh echo sudo /etc/init.d/ntpdate restart >> $TARGET/root/finalize.debian.installation.sh chmod +x $TARGET/root/finalize.debian.installation.sh echo echo remember to execute the following script as root ==after== having rebooted: echo sudo sh /root/finalize.debian.installation.sh echo echo -n "Do you want me to reboot the machine now (press 'y' for yes, anything else for no, default yes)? " answer="y" read answer if [ :$answer: == :: ];then answer=y;fi if [ :$answer: == :y: ]; then sudo shutdown -r now fi