Category Archives: Linux

Quick nagios host config generator

Here is a quick script I have cobbled to generate nagios host configs it may need to be changed for template etc but you get the gist.

It includes support for padding of hostname numbers e.g. padding of 3 = web001, web002….web045…web999.

# Nagios host config generater.
# Bruce Tonge
#If you need to gen a config for a large number of sequentialy numbered hosts
#just run: web 1 50 3
#This will create host entries for machines 1-50 but named web001 - web050
#The output should be redirected to a file.

if [ “$#” -lt “4” ]
echo “usage: $0 <hostprefix> <fqdn> <first node number> <last node number> <host number padding>”
exit 0

host_str=$1 #host prefix
fqdn_str=$2 #domain name
fnode_num=$3 #first node number
lnode_num=$4 #last node number
pad_num=$5 #charicters to pad

for hostnum in `seq -f”%0$5g” $3 $4`;
printf “#Host Entry for Node $shorthostname.\n”
printf “define host{\n”
printf “\tuse\tbasic-host\n”
printf “\thost_name\t$shorthostname\n”
printf “\talias\t$shorthostname\n”
printf “\taddress\t$longhostname\n”
printf “\t}\n”
printf “\n”;
exit 0

Updated: Altiris Linux PXE Kernel \ Driver Update

I have been working on producing a method to update the kernel \drivers within the Altiris DS PXE image. Here is my how to for compiling a new kernel and integrating it into bootwiz.

Update: I have recently had problems with the latest HP DC 8200 elite desktops that are using the new Intel Q67 express chip sets. from what I have found you need to be using a quite modern kernel 2.6.38/39 ish. I personally have had success with the 2.6.39 kernel. This was not spported in the linux boot that was relaesed for DS SP 5.

Continue reading Updated: Altiris Linux PXE Kernel \ Driver Update

My Single Line WordPress Upgrade

Here is my take on the single line word press upgrade I saw at hack a day.
The bellow will download the latest version and unpack it. IT then removes the new plugins and themes as to not over wright your installed ones. IT then copies the new install over the old one and resets the permissions on the files.
wget && unzip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ../

You may need to change the paths for your installation but this should work quite well.
As allways take a backup before you run this just in case.

Yubico has got me exited

Ok I have just herd about the new authentication device from Yubico it is called the Yubikey and it is verry simple it is a usb keyboard in a pen drive that sends a single instance key for authentication anyway I am pressed for time at the mo and this Portugees keyboard is all wrong. But the top and the bottom is havea look it is all opensource they just sell the hardware I have bought mine to play with. you should too. I will postmore when I have had a play but read theresite is is verry cool in the way that it works.

RIP Pandora hello Last.FM

Last FM is the well not new but now legal play what you want internet radio station. And it has its own client so you can play outside of the browser. This is a feature I have always wanted from Pandora. On top of that the client comes in several flavors Windows Apple and Linux and if you use a Debian derivative distro you can install and maintain via apt. Very impressive.