- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: automation installation of package
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 07:49 PM
06-28-2013 07:49 PM
automation installation of package
Hi
we have to upgrade raid manager in nearly 600 servers.
There is no centralized or NFS server.
but from NIM server ,I can log in to all 600 servers.
manuall installation for all 600 hosts requires more time.
in for loop i can add for i in hostname
and make a script.
but i have to automate the full process.
such thing like
taking a copy of HORCM file.
stop HORCM service.
uninstalling raid manager
then installing raid manager.
then start HORCM service.
i would need a help and idea , how to write a script for all steps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 08:56 PM
06-28-2013 08:56 PM
Re: automation installation of package
i would like to add my thoughts ,
for i in hostname1 hostname 2
do
stop horcm services
then
check if horcm servcies are stopped
if not exit
cp -ip backup of horcm configuration
then
uninstall raidmanager
then run raidqry -v
then check if raid manager is uninstalled successfully.
thenn
iinstall new version of raid manager
then run raidqry to confirm if raid manager is updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 09:12 PM
06-28-2013 09:12 PM
Re: automation installation of package
You may just want to develop a script that works on a machine and then sends mail on the status.
Once you have that script, copy it to all the machines and start the script with nohup and in the background and you wouldn't need to stay connected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 09:29 PM
06-28-2013 09:29 PM
Re: automation installation of package
hi Dennis,
thanks for the info.
Can you help me in sharing the sample.
so that i can develop the remaining the part and test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 10:04 PM
06-28-2013 10:04 PM
Re: automation installation of package
>Can you help me in sharing the sample?
Sorry, I don't have one.
You should start with your outline of the steps above.
Take what you do manually and put in a script with checking at each step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2013 08:27 PM
06-30-2013 08:27 PM
Re: automation installation of package
Hi Dnnis,
Thanks for the respose.
i have to started to create the script,but i have doubt in the below script.
as first step, I am taking backup of /etc/horcm0.conf and /etc/horcm1.conf firl.
#!/usr/bin/sh -x
WORKDAY=`date +%Y%m%d`
echo "#ls -ltr /etc/horcm?.conf | grep -c ${WORKDAY}"
ls -ltr /etc/horcm?.conf | grep -c ${WORKDAY}
RTNSTR=`ls -ltr /etc/horcm?.conf | grep -c ${WORKDAY}`
if [ ${RTNSTR} = 1 ]; then
echo "/etc/horcm0.conf and /etc/horcm1.conf today's backup already created."
echo "return 0"
RTNCODE=0
else
echo "#cp -p /etc/horcm1.conf /etc/horcm0.conf_${WORKDAY}"
cp -p /etc/horcm?.conf /home/tmp/raidmgr/log/horcm?.conf_${WORKDAY}
if [ $? -ne 0 ]; then
echo "\nERROR. found."
echo "Cannot backup /etc/horcm0.conf ."
echo "return 1"
RTNCODE=1
else
echo "\n Copy OK."
echo "return 0"
RTNCODE=0
fi
fi
echo "\n End : `date +\"%Y/%m/%d %H:%M:%S\"`"
echo "------------------------------------------------------------"
echo "#cp -p /etc/horcm1.conf /etc/horcm0.conf_${WORKDAY}"
cp -p /etc/horcm?.conf /home/tmp/raidmgr/log/horcm?.conf_${WORKDAY}
1.how i can take backup of two horcm files --> horcm0.conf and horcm1.conf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2013 08:35 PM
06-30-2013 08:35 PM
Re: automation installation of package
Hi,
Actually there are four files,
ls horcm*
horcm.conf horcm0.conf horcm1.conf horcmgr
but i have to take backup only for /etc/horcm0.conf and /etc/horcm1.conf
how can i edit in the script ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2013 10:55 AM
07-01-2013 10:55 AM
Re: automation installation of package
>RTNSTR=`ls -ltr /etc/horcm?.conf | grep -c ${WORKDAY}`
I would recommend using the more modern $() syntax:
RTNSTR=$(ls -ltr /etc/horcm?.conf | grep -c ${WORKDAY})
>if [ ${RTNSTR} = 1 ]; then
Since this is a number, you should use the -eq operator:
if [ ${RTNSTR} -eq 1 ]; then
>1. how I can take backup of two horcm files --> horcm0.conf and horcm1.conf.
> cp -p /etc/horcm?.conf /home/tmp/raidmgr/log/horcm?.conf_${WORKDAY}
This won't replace the value of the "?" on the left to the "?" on the right. You need a loop:
(( failed = 0 ))
for file in /etc/horcm?.conf; do
base=${file##*/} # basename
cp -p $file /home/tmp/raidmgr/log/${base}_${WORKDAY}
if [ $? -ne 0 ]; then
# you can either count the failures or copy your existing error check
(( failed += 1 ))
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2013 04:38 AM
07-02-2013 04:38 AM
Re: automation installation of package
Hi Deenis,
Thanks for the response.
I will try to test as per your suggestion.
I have more doubt,
I am trying to view the output ,while running the script and ouptput has to appened to log file.
echo "/etc/horcm0.conf today's backup already created." >> ${BKP2LOG}
but when i run sh -x, i am able to view the output,but when i run with sh ,i am not able to view.
so currently ,I am using as below..
echo "/etc/horcm0.conf today's backup already created." >> ${BKP2LOG} ----> this will be in log file
echo "/etc/horcm0.conf today's backup already created." ---> I can screen in terminal
is this is the correct way ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2013 09:14 AM
07-02-2013 09:14 AM
Re: automation installation of package
>is this is the correct way?
Yes, you can do that with two echoes. Or you can simply put the script in the background and tail -f the logfile.