my \$bus = Net::DBus->system or die "Can't connect to the system D-Bus";
my \$service = \$bus->get_service("org.freedesktop.SystemToolsBackends.ServicesConfig") or die "Can't get D-Bus service";
my \$object = \$service->get_object("/org/freedesktop/SystemToolsBackends/ServicesConfig", "org.freedesktop.SystemToolsBackends") or die "Can't get D-Bus object";
my @services = \$object->get() or die "Can't get services list";
my \$runl = \$services[1];
my \$servicelist = \$services[2];
my \$ntps;
for my \$serviceref (@\$servicelist) { \$ntps = @\$serviceref[1] if @\$serviceref[0] eq "ntp"; }
for my \$ntp (@\$ntps) { @\$ntp[1] = 1 if @\$ntp[0] == \$runl; }
\$object->set(@services);
The-End
cat > /tmp/network-manager.list << The-End
# deb http://ppa.launchpad.net/network-manager/ubuntu hardy main
# deb-src http://ppa.launchpad.net/network-manager/ubuntu hardy main
The-End
cat > /tmp/fresh-ubuntu << The-End
export DEBIAN_FRONTEND=gnome
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
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