Solaris Express Install Workarond
/tmp/damienf/dtrace
Solaris Express Pains
We install all Sun unbundled software and many ISV applications like
Oracle on each build of
Solaris and over the last 12 months we had 10 cases where the install
failed directly or indirectly
becuase of changes to the output from
uname.
Hard to beleive
10 times we have had to put work around in place, never hard, but time
consuming and not adding a lot of value to the customer ( and boring )
So I am very very happy to see Angelo Rajadurai and Jon Hasalam
have between them come up with a
d script to
change the uname output
on the fly. Install your software and then change it back :)
Over a number pints in a famous old Dublin Pub ( that doesn't really
narrow the search
a lot ) I reminded
Bryan that
dtrace isn't just for
Performance it
can help solve
so many QA problems too. dtrace is for everyone not just performance people
Angelo and Jon wrote it !
#!/usr/sbin/dtrace -Cs
#include<sys/systeminfo.h>
#pragma
D
option destructive
syscall::uname:entry
/ppid
==
$1/
{
self->addr = arg0;
}
syscall::uname:return
/ppid
==
$1/
{
copyoutstr("SunOS", self->addr, 257);
copyoutstr("PowerPC", self->addr+257, 257);
copyoutstr("5.10", self->addr+(257*2), 257);
copyoutstr("Generic", self->addr+(257*3), 257);
copyoutstr("PPC", self->addr+(257*4), 257);
}
syscall::systeminfo:entry
/arg0==SI_ARCHITECTURE/
{
self->arch = arg1;
}
syscall::systeminfo:return
/self->arch
&& ppid == $1/
{
copyoutstr("PowerPC", self->arch,257);
self->arch=0;
}
syscall::systeminfo:entry
/arg0==SI_PLATFORM
&& ppid == $1/
{
self->mach = arg1;
}
syscall::systeminfo:return
/self->mach
&& ppid == $1/
{
copyoutstr("APPL,PowerBook-G4", self->mach,257);
self->mach=0;
}
Posted at
11:41AM Jun 01, 2005
by damienf in Solaris |