Restoring a Zen image

From MicroFocusInternationalWiki
Jump to: navigation, search

My test imaging Script

this uses if then and uses grep to pull the machine info

#!/bin/bash

zisedit -c img pdall img pc1 ntfs img pa1

img rp 10.1.250.161 //10.1.250.161/vol1/timtest/sp1.ZMG

if hwinfo --bios | grep -i "Optiplex GX260" ; then img rp 10.1.250.161 //10.1.250.161/vol1/timtest/drivers/gx260.zmg elif hwinfo --bios | grep -i "HP d530 SFF(DG784A)" ; then img rp 10.1.250.161 //10.1.250.161/vol1/timtest/drivers/dc5000.zmg elif hwinfo --bios | grep -i "HP Compaq dc5100 SFF(AG143AW)" ; then

       	img rp 10.1.250.161 //10.1.250.161/vol1/timtest/drivers/dc5100t.zmg

elif hwinfo --bios | grep -i "Evo D510 SFF" ; then

       	img rp 10.1.250.161 //10.1.250.161/vol1/timtest/drivers/dc510.zmg

#elif hwinfo --bios | grep -i "23738TU" ; then img rp 10.1.250.161 //10.1.250.161/vol1/timtest/drivers/t43.zmg fi

img rp 10.1.250.161 //10.1.250.161/vol1/images/addon/adobe70.zmg img rp 10.1.250.161 //10.1.250.161/vol1/images/addon/winzip90.zmg img rp 10.1.250.161 //10.1.250.161/vol1/images/addon/msoffice2003rev4.zmg img rp 10.1.250.161 //10.1.250.161/vol1/images/addon/windowsupdate.zmg img rp 10.1.250.161 //10.1.250.161/vol1/images/addon/vviewer.zmg


Notes

this is how i do it ... need help