Freelancer Released!

As any fan of Privateer (1 or 2) knows, Freelancer was finally released! Not quite the game promised, but it’s still loads of fun. I’ve also setup an Internet accessible server called Zulu System (why do most servers add crazy characters trying to be first on the listings? I sort by ping :).

You can also add it by editing the properties of your shortcut and adding
‘-skulish.com:2302’ without the quotes.

NOTE: Server has since been shutdown!

Win32 Perl

Actually did my first win32 perl script at work today. What a pita that can be when you are changing from *n?x perl. Most of the problems I encountered were editor issues. Guess I should have just gotten vi for Windows and been done with it.

###
# First we’ll change into the directory passed in the command line
###
$workdirectory = @ARGV[0];
#print (“$workdirectory\n”);
chdir (“$workdirectory”) || die “cannot cd to $workdirectory”;

###
# Lets get a numeric date for use in naming the zip files
###
$insanedate = `date /t`;
# print $insanedate;
$insanedate =~ /.*?(\d{2})\/(\d{2})\/(\d{4})/;
$sanedate = “$1$2$3”;
# print “$sanedate\n”;

###
# Time to backup the .bak files
###
# must include the extension in the form of *.ext
@baklist = `dir /b *.bak`;
if (!@baklist)
{
# Drop out of the script if there is nothing to backup!
print “No files to backup”;
die;
}
else
{
# This will create a zipfile with the current date.zip
`pkzip $sanedate.zip *.bak`;

###
# Take care of directory cleanup
###
@filelist = `dir /b /o:d *.zip`;
# The $keeperN files are the ones that will be (newest) saved,
# anything left in the list will be removed from the directory
if (@filelist)
{
$keeper1 = pop (@filelist);
$keeper2 = pop (@filelist);
# $keeper3 = pop (@filelist);
# print (“$keeper1”);
# print (“$keeper2”);
# print (“$keeper3”);

# DANGER Will Robinson!! DANGER!!
`del *.bak`;
# Activating the following del statement has the potential to
# do lots of damage. Please check working directory first!
foreach $leftover (@filelist)
{
print $leftover;
# `del $leftover`;
}
}
else
{
print “No zip files, CAUTION!”;
die;
}
}

Inspiron 2650 + FreeBSD

Just slapped together a little how-to on getting FreeBSD installed on a Dell Laptop. As always, comments are welcome. This is the first interation of this how-to, so if you see anything wrong, have a suggestion or whatever, please post a comment!

1. Boot FreeBSD CD
a. At Booting [Kernel] in 10 seconds; hit space
b. At OK type boot -c
c. At config> eisa 0
d. At config> quit

2. Install FreeBSD minimal set
a. Install ports collection
b. Install kernel sources

*NOTE*
If you need assistance with the install of FreeBSD,
visit http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html

3. During the reboot, you will have to accomplish step 1 again

4. Edit fstab as follows
a. Noauto on proc
b. Noatime on all others
c. Leave the /swap alone

5. Edit /etc/make.conf by uncommenting the following
a. touch /etc/make.conf
b. echo “CLFLAGS= -O -pipe” >> /etc/make.conf
b. echo “NOPROFILE= true” >> /etc/make.conf
c. echo “USA_RESIDENT= YES” >> /etc/make.conf

6. Compile new kernel
a. comment out device eisa
b. add device agp
c. add options VESA
d. add options SC_PIXEL_MODE

7. Add soundcard support
a. echo “snd_ich_load=\x94YES\x94” >> /boot/loader.conf

8. Configure console by adding the following commands to rc.local
a. echo “vidcontrol VESA_800x600” >> /etc/rc.local
If you don’t do this, exiting X will completely blow your console, requiring a reboot.
b. reboot

9. Install the following package
a. pkg_add -r cvsup-without-gui

10. cvsup the ports collection

*NOTE*
If you need help with the cvsup process,
visit http://bsdvault.net/sections.php?op=viewarticle&artid=3

11. Install the Xfree 4.2.x from ports (must be installed from ports, we will need to patch this with the nv (nvidia) driver.)
a. Compile XFree 4.2.x (yes, we will recompile the server, but this picks up everything we need)
b. Patch XFree86-4-Server with the nvidia code
i. Get the nv.tar.gz patch (http://www.marcuscom.com/g2g-xfree86/article.html)
ii. Cd /usr/ports/x11-servers/XFree86-4-Server
iii. Make clean
iv. Make patch
v. Cd work
vi. Tar -zxvf /path/to /nv.tar.gz
vii. Cd ..
viii. Make all
ix. Make deinstall
x. Make reinstall
c. configure X using the graphical utility from the /stand/sysinstall menu
i. Vert refresh 50 – 100
ii. HorizSync 31.5 – 90

12. Install Gnome2 port
a. I don’t recommend starting gdm from rc.local until you are completely certain that everything is working right
b. I usually just log in as root and do a gdm && exit real quick. (learned that from Super Stibbers)

Security Audit Time Again!

So, I’m sitting there, minding my own business because it’s towards the end of the work day and I just want to get home. Then an email comes in, another security audit is coming down the pipe. No big deal, been through them before, but they are a pain in the ass.

I figured what the hell, I’ll read through the requirements to see what they are looking for. I get to about line 5 of the email, and right there, amidst all the other ludicrous requests is them asking for my “/etc/shadow report”. There is no “report” that can be yielded from the shadow file, other than brute forcing the passwords and seeing what comes up. I know for a fact that these jackasses aren’t bright enough to actually asking for that, so that must mean… The light comes on, WHAT IN THE *censored* DO THEY NEED MY SHADOW FILE FOR? IT’S GOT ALL THE GODDAMN PASSWORDS.

Well, I start thinking, could just be a test, seeing if I’ll just upchuck the guts to my servers without asking why. So, I grind out a short email to the ol’ manager stating the fact (adlib here) that I wouldn’t give that file to my own mother.

Gets to be time to go, and as usual, I do a quick round to make sure none of the developers need anything from the “server god” before I go home for the day. I pop my head into the manager’s office, exchange a little chit chat. He then informs that “they (meaning the audit firm) got a lot out of us last time and I’m sure there is something in the contract.” I about breached my BVD’s on the spot.

Now, I don’t want to make it look like my manager is the devil himself. He does try hard afterall, but that comment got me thinking there is no conductor on this train and I’m just behind the coal car. This is gonna hurt.

So, if I am, in the end, forced to surrender that file to the audit team, I do so under protest. Nasty, rioting in the streets type peaceful protest. If and when my servers are r00ted, every swingin’ richard better be there with me while I rebuild. Everyone down from the CIO of the Americas to the audit team.

**Edited by Request**

Staying on top of your ports, the easy way

I submitted this over at Soup’s BSDHound.com but I’m such a literary genius, I thought I would put it here too:

A lot of people try to claim various things are the “mother of invention”, but as ?n*x or ?BSD admins, we know the truth. And that truth is…. LAZINESS. Yep, if it weren’t for lazy admins, we wouldn’t have half of the automation scripts we have today. This affliction is what finally forced me to learn some Perl.

Keeping your ports tree and, subsequently, your installed binaries up to date can be a tedious task to say the least. To help alleviate this situation (and to help resume my laziness and boredom) I wrote up a script to automate cvsup’ing my ports tree. I’m not going to sit here and tell you that I’m a scripting genius, the syntax of the script would just call me a liar. But I will tell you that this script works for me on both 4.x, 5.x and 6.x stable systems. If you find out it works on others, or modify it to do so, drop me a line at packetmad[at]kulish[dot]com.

Anyway, back to what we we’re talking about. What this script does is cvsup your ports tree, run portupgrade -na (NO PORTS ARE INSTALLED) and generate a nice looking email report sent to the address of your choosing. It’s actually fairly well documented with in the script itself (amazing, huh?)

Here is an example report:

cvsup SUCCEEDED on Thu Nov 13 00:30:00 CST 2003!!
For host hivemind.some.net!!

PORTUPGRADE Results:
Legend: +:Upgrade / -:No Upgrade / *:Skipped / !:Failed

– security/openssl (openssl-0.9.7c)
– devel/libtool13 (libtool-1.3.5_1)
– security/openssh-portable (openssh-portable-3.7.1p2)
– lang/ruby16 (ruby-1.6.8.2003.10.15)
– lang/ruby16-shim-ruby18 (ruby-shim-ruby18-1.8.1.p2)
– shells/zsh (zsh-4.0.7)
– net/ntp (ntp-4.2.0)
– converters/libiconv (libiconv-1.9.1_3)
– textproc/expat2 (expat-1.95.6_1)
– devel/gettext (gettext-0.12.1)
– devel/gmake (gmake-3.80_1)
– net/mpich (mpich-1.2.5_2)
– net/cvsup-without-gui (cvsup-without-gui-16.1h)
+ lang/perl5.8 (perl-5.8.1_2)
– sysutils/portupgrade (portupgrade-20030723)
– misc/screen (screen-4.0.1_1)

From there you can decide what/when you want to upgrade. It makes it A LOT easier to schedule your updates between Nethack sessions this way.

A note on requirements. It needs to have cvsup-without-gui, portupgrade and Perl 5 installed to work correctly.

If you are still interested, after all this rambling, the script can be obtained from www.lanside.net ‘s download section.