Quantcast
Channel: Micro Focus Forums
Viewing all articles
Browse latest Browse all 11924

Imaing Script Help

$
0
0
I was lucky enough to get some extra help this summer with re-imaging laptops. The group I have are not techs but good enough that they can follow the instructions I leave. I wanted to make things a little easier by prompting for a computer name for the new computers we just got in instead of having them type out the zisedit commands required for my pre image tasks. I am having a little problem when I put the script in the Imaging script section within my preboo task for ZCM. I was able to get my original lines to run which wasn't all that great just a img command and a reboot. Here is what I am trying to do now and the script seems to cycle through without running the script like I expected.

#! /bin/bash
if [ -n "$(zisview ComputerName)" ]; then
WSNAME=$(zisview Computername)
else
echo "No Image safe data found. Workstation Name required."
while test ! $WSNAME; do
echo -n "Please enter the workstation name: "
read WSNAME
if [ ${#WSNAME} -gt 15 ] ; then
WSNAME=""
echo "Workstation name must be 15 characters or less."
zisedit -c
fi
done
fi
zisedit Computername=$WSNAME
zisedit DNSHostName=$WSNAME
zisedit WindowsWorkGroup=WG1
zisedit DHCP=ON
if [`hwinfo --bios|grep -c -i "HP ProBook 4540s"` != 0]
then
img rp <IP ADDRESS> /var/opt/novell/zenworks/content-repo/images/w7x86a.zmg
reboot
fi
img rp <IP ADDRESS> /var/opt/novell/zenworks/content-repo/images/w7x86.zmg
reboot

Two Questions.
1. What i am trying to do is possible using the Imaing Script inside ZCC correct?
2. If so can anyone tell what I did wrong with the script that is causing this to fail?

Thanks for the assistance!

Richard

Viewing all articles
Browse latest Browse all 11924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>