Unix Humour
I came across (via an old school friend on facebook) something which I just had to share. I know whom will be laughing at this.

I came across (via an old school friend on facebook) something which I just had to share. I know whom will be laughing at this.

Only 2 months ago I wrote that Gmail had hit 4GB, but it was still behind the main crowd (MSN, Yahoo, etc).
Well in time for the new year, they have finally hit the 6GB (not 6GiB yet!) limit. This was initially picked up by a number of bloggers including WikiGiz and BBCentral.
I’ve totally cutover to Gmail since they enabled IMAP and I figured out how to turn it on. Apple Mail now accesses gmail as my only mail account, and I get everything synced between the web interface and Mail.app including read/unread, starred/flagged and the labels/folders.
With this very quick increase of 1GB per month over the last two months, who knows where they will go next.
I was looking for a simple way to have someone emailed when an event occurred in Rational Clearcase, like a new branch type being created. If you run Clearcase on UNIX (i.e. Solaris or similar) you can whip up a simple shell script and create your trigger. I will assume you have sendmail or similar already configured on your host so that mail utilities can send smtp mail
Lets have a go at it.
Write a shell script that uses mailx to send a message with some Clearcase trigger variables embedded in it, something like this:
# Comma delimited email list of mail recipients
adminmail="youraddress@your.domain.com"
#This gets the host name
host=`uname -a |awk '{print $2}'`
#Begin send of message
echo "\
Creation of brtype \"$CLEARCASE_BRTYPE\"
by: $CLEARCASE_USER
comment: $CLEARCASE_COMMENT" \
| /usr/bin/mailx -s "[$host:CLEARCASE] New branchtype $CLEARCASE_BRTYPE created"
You can download this mail_new_brtype.sh if you are in a rush.
In this script you will see a number of variables starting with $CLEARCASE. These variables will be populated as environment variables when a trigger event occurs and launches the shell script.
The script should be saved somewhere it can be run on the UNIX server hosting the VOB, so when Clearcase triggers it can run the script. An appropriate location would be in the home directory of the VOB owner, for example:
/home/ccadmin/ccscripts/mail_new_brtype.sh
One you have saved the script, you need to actually make the trigger in Clearcase. Consider the following on creating this trigger type
You can research these options by viewing the man page of the command used to make a new trigger type:
cleartool man mktrtype
Once you have had a read of the man page, you should see some examples and options that can be used. Have a go at running the command yourself. This is what I came up with and should cover all our considerations:
cleartool mktrtype -c "Trigger to email cfgmgr on new brtype creation" -type -postop mktype -brtype -all -exec /home/ccadmin/ccscripts/mail_new_brtype.sh new_branch_trigger
My example shown here is relevant to Clearcase V6, so YMMV.
Once that has been run, you can see your new trigger listed in the trigger type list:
cleartool lstype -kind trtype
18-Dec.10:27 ccadmin trigger type "new_branch_trigger"
"Trigger to email cfgmgr on new brtype creation"
Next time a user creates a branch type, you will receive an email with the branch type name, branch type comment and whom created it!
Look for more upcoming tips; including how to make a trigger use a perl script to validate label names.
A number of weeks ago I gave up caffeine, and was pretty OK with that. But, I have come to the conclusion that there is a direct correlation with Caffeine and all other things tech, including tech blogging.
As you may have noticed if you subscribed to my feed, or read this site, my posts have been minimal.
Yet after having caffeine on the weekend in an energy drink, and subsequently picking up where I left of with decent illy coffee, I have had the urge to blog again. Nothing tech yet - but here I am.
I’m back baby!
Watch this and then you will see why action is the better option than no action