Back to Bash
Well, I’m back to something I’m comfortable with at work.
Yep, I finally got most of my end of the workstation imaging project done last week. The basic images for the hardware and the Novell client are all squared away. At least, they are for all the hardware that we have in stock. I still need to get images of one of the older Dell PCs and the engineering laptop, but that’s easy enough now that I have a good idea what I need to do. The hardest part of all this, so far, has been figuring out what should go into the dang image! But, the resident expert on workstation images got me all fixed up in that area and the rest was actually pretty simple.
Now, though, I’ve been back to the Linux-based ZENWorks Imaging partition. We had an “issue” with the restore menu I did. Apparently, if you have an existing partition and only restore one partition of an image, it doesn’t completely wipe the existing partition. In other words, it just copies the files over the existing install. Not good enough for our purposes. So, I had to devise a method for deleting the existing C partition, recreating it and then, finally, restoring it from the local backup image. Not a problem, right? Wrong. I needed to have a universal menu that could tell what size the existing partition was and plug that into the script which recreated the partition. Not quite as easy as it sounds. Well, thanks to sed & awk, second edition, I found a relatively painless and reliable way to get it done. Basically, I run an “fdisk /dev/hda -l”, pull the relevant information from those results with grep and use “awk” to spit out the correct information to populate the variable. Actually, I have to do some mathmatical adjustments to that, too, but, in a nutshell, that’s what I did. If anyone is really interested and doesn’t want to shell out the money for Learning the bash shell, second edition and sed & awk, second edition, I can put the restore menu that I use up on the site. I have to admit, it’s a pretty sweet solution. Hmm, maybe I’ll submit it to Cool Solutions for another t-shirt….
Well, that’s what I’ve been up to at work. If youse guys want to know more, just pop something into the comments!