Archive for the ‘work’ Category

Worlock (live)

wasted truth.
why call it all, blue?
hot lines.
eventual decline.
with the right attitude you will succed, blue.
resent that discontent.
sidestep.
define the state of things so far.
crazy things, soft spoken..overide.
with your eyes open, you know soft spoken changes nothing.
a view so cruel.
nothing.

 

A good day

image

@ the office

Email, the painful truth

My co-workers often harass me for not consistently checking my email. This is the best explanation for my behavior I can offer:

Lots more reasons at The oatmeal: Email

Ready for the weekend

Captain Rekick

Well, I nuked / (root) on my work computer today and it finally occurred to me how this happened.

I was working on a gentoo deployment image for a customer. I didn’t want to manually build a kernel for all hardware options, so I was using genkernel.

I needed to rebuild the kernel to include nic drivers for net booting.  As it turns out, when running genkernel, the program attempts to mount /boot (based on the fstab) before copying the initramfs image and kernel to /boot (brilliant?). Under normal circumstances, this is perfectly ok, however, I was working in a chroot, with the host /dev bind mounted under the chroot /dev. The chroot fstab specified /dev/sda1 as boot while on the host device… drum roll .. this actually corresponded to (what was) my root partition.

After I was done with my work, I ran my deployment script; which tars up the important parts of the file system and deletes the source; which this time, included my root partition.

So, what have I learned…

Never mount /dev in a chroot unless you actually need access to the hardware. ESPECIALLY, when using Tardix.

From The Gentoo Genkernel Guide

–no-install: Activates [or deactivates] the make install command, which installs your new kernel image, configuration file, initrd image and system map onto your mounted boot partition. Any compiled modules will be installed as well…

(note, it doesn’t mention that it will try to mount /boot if it is not mounted….)

Does anyone know if make install attempts to do this? I think not! I hope not. If we forget to mount /boot (and we wanted to mount boot) when running make install, and we are too dumb to figure out why it doesn’t work.. please don’t try to fix it for us.. please.. we need to learn.. or maybe .. just maybe.. we knew what we were fucking doing in the first place!!!!!!

FUCK!

PHP Perl Class

Hello,

I have a bit of problem combining PHP and Perl language.

I am trying to pass Perl variables into PHP and keep getting this error

“PHP Fatal error: Class ‘Perl’ not found in /var/www/html/hidden.php on line 3

find attached copy of my script.

Regards,
Customer

Naturally, I thought the customer was crazy. Then I looked at the script:

$perl = new Perl();
$perl->require(“userexit.pl”);

I lol’ed and then search, it seems the Perl class is provided by the Zend people in the form of a php extension, which is, fortunately, in pecl.

Unfortunately, this package seems to be broken :)

( ~ ) pecl install perl
Package “perl” Version “1.0.0″ does not have REST xml available
install failed

I did some searching and found an ‘open’ bug report:
16807

Rather than did too deep, I decided to just install the module manually for the customer.

# wget http://pecl.php.net/get/perl-1.0.0.tgz
# tar xzfv perl-1.0.0.tgz
# cd perl-1.0.0
# phpize
# ./configure
# make
# make install

Now edit your php.ini to include:

extension=perl.so

Or on Red Hat/Fedora, simply:

echo “extension=perl.so” > /etc/php.d/perl.ini

Don’t forget to restart apache.

viola:

# php -v ; php -m | grep perl
PHP 5.1.6 (cli) (built: Feb 26 2009 07:01:12)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
perl

As always, be careful when installing unmanaged modules. Future updates to php may introduce instability when depending modules are not rebuilt with the new symbol table.

Happy Hacking.

Screenshots

Well, I got a new workstation with pci-express and a gforce 8600. I generally like to use lightweight window manages (I have been using blackbox/fluxbox for the past 6 years or so) but I wanted to play around with the xgl hotness. Anyway, here are some screens. Workstation is running debian testing.

~

Return top