function cleanup { echo "Cleaning up..." sudo apt-get autoremove --assume-yes --force-yes } In other words, "Remove a bunch of packages that might have nothing to do with anything Ultamatix has installed, and don't ask the user first. Oh, and assume yes when asked whether to do anything potentially damaging". This gets called 103 times in various bits of Ultamatix.





Oh, notice the sudo in there? Ultamatix is running as root already. Despite this, there are 429 separate calls to sudo.



#Test O/S 64 or 32 bit... architecture=`uname -m` targetarch="x86" #Set 64-bit machines to download 32-bit if no options are set if [ "$architecture" != "x86_64" ] && [ "$architecture" != "ia64" ]; then architecture="x86" else architecture="x86_64" fi It turns out that ia64 is not especially good at running x86_64 binaries. Never mind, eh?



rm -rf $AXHOME/.gstreamer-0.10 gst-inspect sudo gst-inspect Which translates as "Delete any self-installed plugins, run gst-inspect as root in an attempt to regenerate the plugin database, really run gst-inspect as root in an attempt to regenerate the plugin database". The flaws in this are left as an exercise for the reader.



sudo apt-get --assume-yes --force-yes remove --purge Used 111 times. Will remove the packages it installed, but also any other packages the user has installed that happen to depend on them. Without asking.



sudo cp /etc/apt/sources.list /etc/apt/sources.bak sudo echo "deb http://ppa.launchpad.net/project-neon/ubuntu hardy main" >> /etc/apt/sources.list sudo apt-get update if ! sudo apt-get install --assume-yes --force-yes amarok-nightly amarok-nightly-tools amarok-nightly-taglib then AX_fatal "An apt-based error occurred and installation was unsuccessful"; fi echo "Restoring sources." sudo cp /etc/apt/sources.bak /etc/apt/sources.list sudo apt-get update The good news is that it backs up your sources.list before breaking things. The bad news is that it's still utterly horrifying.



#since we have root we need to discover normal username so we can create the shortcut & set proper permissions NU=$(cat /etc/passwd | grep 1000 | cut -d: -f1) sudo chown $NU:$NU "legends_linux-0.4.1.43.deb" sudo chmod +x legends_linux-0.4.1.43.deb sudo dpkg -i legends_linux-0.4.1.43.deb List of fail: Assuming that the user has uid 1000 Chowning a deb to the user for no obvious reason (hint: a user can delete root owned files that are in the user's home directory) Making a deb executable for no reason whatsoever Assuming that user information will be in /etc/passwd Not just, say, passing the user's name to the application IN THE FIRST PLACE

sudo apt-get --assume-yes --force-yes install f-spot dvgrab kino devede gtkpod-aac ipod gnupod-tools libgpod-common libipod-cil libipoddevice0 libipodui-cil libhfsp0 hfsplus hfsutils libipod0 If only we had some way of saying that libraries used by programs should automatically be installed when a program is. Wouldn't that be great?



echo "Adding mediabuntu repository" sudo cp /etc/apt/sources.list /etc/apt/sources.bak sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list ... echo "Restoring sources." sudo cp /etc/apt/sources.bak /etc/apt/sources.list Yeah. that'll help.





The Swiftweasel install that checks your CPU type and then has some insane number of cut and paste code chunks that differ only by the filename of the tarball it grabs. Rather than, say, using a variable and writing the code once.





The cutting and pasting of the same code in order to install swiftdove.





Code that installs packages differently depending on whether they happened to be in your home directory to start with or whether it had to download them for you



if ! DEBIAN_FRONTEND=kde sudo apt-get --assume-yes --force-yesinstall virtualbox No, I didn't remove any spaces from that.

