A Little Off Code, Computers, Photography and Guns

3May/101

FreeNAS Users Rejoice!

Unetbootin[1] now supports FreeNAS! Take a look at these awesome little snippets of code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//distrolst.cpp
if (nameDistro == "FreeNAS") {
    if (isarch64) {
        cpuarch = "amd64";
    } else {
        cpuarch = "i386";
    }
    instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
    if (islivecd) {
        downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/FreeNAS-%1-LiveCD-%2.img.gz").arg(cpuarch, relname), QString("%1ubninit").arg(targetPath));
    } else {
        downloadfile(QString("http://sourceforge.net/projects/freenas/files/stable/0.7/FreeNAS-%1-embedded-%2.img/download").arg(cpuarch, relname), QString("%1ubninit").arg(targetPath));
    }
}
1
2
3
4
5
6
//distrover.cpp
distroselect->addItem("FreeNAS", (QStringList() << "0.7.4919" <<
unetbootin::tr("<b>Homepage:</b> <a href=\"http://freenas.org/\">http://www.freenas.org</a><br/>"
    "<b>Description:</b> FreeNAS is an embedded open source NAS (Network-Attached Storage) distribution based on FreeBSD.<br/>"
    "<b>Install Notes:</b> The LiveCD version creates a RAM drive for FreeNAS, and uses a FAT formatted floppy disk or USB key for saving the configuration file. The embedded version allows installation to hard disk.") <<
"0.7.4919" << "0.7.4919_x64" << "0.7.1.5024_Live" << "0.7.1.4997_Live_x64"));

Segue:
I'm actually considering forking the unetbootin project to add support for a master distro list which can be updated remotely eliminating the requirement for users to download a new copy of the program if they wish to get the latest version of the list of pre-configured distros.

This has a little bit to do with the fact that I'll be required to take a few C++ courses at the University of Wyoming since Java is the standard language taught at the University of Arizona while I was there and I've never used C++ before. Can't be that hard right?

  1. http://unetbootin.sourceforge.net/ []