home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2013 / 2013.06.linuxmafia.com / linuxmafia.com / pub / helpful-things / hardy / fresh-ubuntu-hardy next >
Encoding:
Text File  |  2008-08-08  |  3.6 KB  |  54 lines

  1. #!/bin/bash
  2. gksu echo of your voice|fgrep -q voice || exit 1
  3. wget http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - &&
  4. wget http://akirad.cinelerra.org/dists/akirad.key -O- | sudo apt-key add - ||
  5. (zenity --error --text "Couldn't add an APT key!" && exit 1) || exit 1
  6. cat > /tmp/servntp.pl << The-End
  7. use strict;
  8. use Net::DBus;
  9. my \$bus = Net::DBus->system or die "Can't connect to the system D-Bus";
  10. my \$service = \$bus->get_service("org.freedesktop.SystemToolsBackends.ServicesConfig") or die "Can't get D-Bus service";
  11. my \$object = \$service->get_object("/org/freedesktop/SystemToolsBackends/ServicesConfig", "org.freedesktop.SystemToolsBackends") or die "Can't get D-Bus object";
  12. my @services = \$object->get() or die "Can't get services list";
  13. my \$runl = \$services[1];
  14. my \$servicelist = \$services[2];
  15. my \$ntps;
  16. for my \$serviceref (@\$servicelist) { \$ntps = @\$serviceref[1] if @\$serviceref[0] eq "ntp"; }
  17. for my \$ntp (@\$ntps) { @\$ntp[1] = 1 if @\$ntp[0] == \$runl; }
  18. \$object->set(@services);
  19. The-End
  20. cat > /tmp/network-manager.list << The-End
  21. # deb http://ppa.launchpad.net/network-manager/ubuntu hardy main
  22. # deb-src http://ppa.launchpad.net/network-manager/ubuntu hardy main
  23. The-End
  24. cat > /tmp/fresh-ubuntu << The-End
  25. export DEBIAN_FRONTEND=gnome
  26. for MoDdY in \$(ls /lib/modules/\$(uname -r)/kernel/drivers/acpi|sed 's,\.ko\$,,g'); do lsmod|fgrep -q \$MoDdY || (modprobe -q \$MoDdY && echo \$MoDdY >> /etc/modules) || true; done
  27. echo APT::Cache-Limit \"33554432\"\; >/etc/apt/apt.conf.d/00Cache
  28. # wget -P /etc/apt http://linuxmafia.com/isos/hardy/preferences
  29. wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list
  30. wget http://akirad.cinelerra.org/dists/hardy.list -O /etc/apt/sources.list.d/akirad.list
  31. wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
  32. sed -i -e 's,^.*cdrom.*\$,,g' -e 's,^\# *deb,deb,g' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
  33. cat /tmp/network-manager.list > /etc/apt/sources.list.d/network-manager.list
  34. apt-get update || true
  35. apt-get -y --force-yes install medibuntu-keyring || true
  36. apt-get update
  37. ArCh=\$(uname -m | sed -e 's,i[3-6]86,i386,' -e 's,x86_64,amd64,')
  38. case \$ArCh in i386) JaVa=sun-java6-plugin ;; amd64) JaVa=ia32-sun-java6-bin ;; esac
  39. for VrAm in \$(egrep '(: VESA VBE Total Mem: )|(: VideoRAM: )' /var/log/Xorg.0.log|sed 's,^.* \([0-9]*\) kB.*\$,\1,g' || true); do [ \$VrAm -gt 32768 ] && CcSm=yes\$CcSm || true; done
  40. [ "\$CcSm" ] && CcSm=simple-ccsm || true        #    kudos to ZaReason
  41. echo debconf hddtemp/daemon select true|debconf-set-selections
  42. mv /etc/ntp.conf /tmp/ || true
  43. apt-get -y --force-yes --install-recommends install pnputils sensors-applet lm-sensors ntfs-config build-essential fakeroot sun-java6-fonts \$JaVa ubuntu-restricted-extras lshw-gtk menu-xdg extra-xdg-menus ntp linux arj lzop ncompress p7zip-full sharutils unace lha gkdebconf linux-backports-modules-hardy libdvdcss2 non-free-codecs gstreamer0.10-fluendo-mp3 gstreamer0.10-fluendo-mpegdemux \$CcSm #libstdc++5
  44. [ -f /etc/ntp.conf ] || mv /tmp/ntp.conf /etc/ || true
  45. perl -w /tmp/servntp.pl || true
  46. update-java-alternatives -s java-6-sun || true
  47. apt-get -y dist-upgrade
  48. apt-get clean
  49. zenity --question --title 'BIG FAT WARNING!!!' --text 'Running sensors-detect on Hardy Heron (8.04) on certain motherboards WILL absolutely FRY the CPU!!! Do it anyway?\n\nIf you know not whether this applies to you, read:\nhttp://www.lm-sensors.org/wiki/Configurations/Sapphire/AM2RD790' && echo -e '\n\n\n\n\n\n\n\nyes'|sensors-detect || true
  50. echo
  51. dpkg-reconfigure x-ttcidfont-conf
  52. The-End
  53. gksu -- gnome-terminal -x bash -c 'bash -e /tmp/fresh-ubuntu || zenity --error && exit 1'
  54.