I have corrected the syntax as shown below. There is a space AND not tab space between if and square bracket and space btw ==
Code:
if [ "$PATCHACTION" == "restartXAPI" ]
then
/opt/xensource/bin/xe-toolstack-restart
sleep 60
elif [ "$PATCHACTION" == "restartHost" ]; then
reboot;
sleep 60
fi
The error message below popped up instead.
Code:
[root@xen01 ~]# ./postscript.sh
Secondboot
sleeping in 60 secs
Uploading Update ls /tmp/updates...
Operation failed. Error: file '/tmp/Updates/ls' does not exist
installing Update ls /tmp/updates...
The uuid you supplied was invalid.
type: pool_patch
uuid:
rm: cannot remove `/tmp/updates': Is a directory
Broadcast message from root (pts/1) (Tue Apr 1 17:29:28 2014):
The system is going down for reboot NOW!
[root@xen01 ~]#
The server rebooted without the patches being applied.
---------- Post updated at 07:40 PM ---------- Previous update was at 06:23 PM ----------
Hi Npandith and Sea VBS,
Thanks all for your candid help...
whilst progress made is sloow, it rather further sheds some light on what's happening.
Error 1:
When I manually patch-apply and updating the file-name= capital letter e.g. XS62E001.xsupdates, the patch install successfully. The patches are all in capital letters like such XS62E001 , 002 etc but instead reports file does not exist as shown below when ran via script. I thereafter changed on all patch to lower case letters, same result.
Error 2:
pool_patch being reported is another confusing bit, the syntax say patch-apply for a single server and pool-patch-apply for a group of servers in a pool. I'm still researching the proper syntax for a server vs pools of server.
Any tips regarding Error 1 would be nice to resolve for now guys.?
Thanks for your help.
Code:
./postscript.sh
mkdir: cannot create directory `updates': File exists
./postscript.sh: line 11: echo Downloading updates...: command not found
--2014-04-01 19:20:00-- ftp://192.168.10.5/FTP/xen62/*.xsupdate
=> `.listing'
Connecting to 192.168.10.5:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /FTP/xen62 ... done.
==> PASV ... done. ==> LIST ... done.
[ <=> ] 951 --.-K/s in 0.005s
2014-04-01 19:20:02 (170 KB/s) - `.listing' saved [951]
Removed `.listing'.
--2014-04-01 19:20:02-- ftp://192.168.10.5/FTP/xen62/XS62E001.xsupdate
=> `XS62E001.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E001.xsupdate ... done.
Length: 6625641 (6.3M)
100%[==============================================================================================================================>] 6,625,641 --.-K/s in 0.1s
2014-04-01 19:20:02 (56.1 MB/s) - `XS62E001.xsupdate' saved [6625641]
--2014-04-01 19:20:02-- ftp://192.168.10.5/FTP/xen62/XS62E002.xsupdate
=> `XS62E002.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E002.xsupdate ... done.
Length: 1743501 (1.7M)
100%[==============================================================================================================================>] 1,743,501 --.-K/s in 0.03s
2014-04-01 19:20:02 (52.3 MB/s) - `XS62E002.xsupdate' saved [1743501]
--2014-04-01 19:20:02-- ftp://192.168.10.5/FTP/xen62/XS62E004.xsupdate
=> `XS62E004.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E004.xsupdate ... done.
Length: 35766769 (34M)
100%[==============================================================================================================================>] 35,766,769 77.2M/s in 0.4s
2014-04-01 19:20:02 (77.2 MB/s) - `XS62E004.xsupdate' saved [35766769]
--2014-04-01 19:20:02-- ftp://192.168.10.5/FTP/xen62/XS62E005.xsupdate
=> `XS62E005.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E005.xsupdate ... done.
Length: 9315631 (8.9M)
100%[==============================================================================================================================>] 9,315,631 19.8M/s in 0.4s
2014-04-01 19:20:03 (19.8 MB/s) - `XS62E005.xsupdate' saved [9315631]
--2014-04-01 19:20:03-- ftp://192.168.10.5/FTP/xen62/XS62E010.xsupdate
=> `XS62E010.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E010.xsupdate ... done.
Length: 252927 (247K)
100%[==============================================================================================================================>] 252,927 --.-K/s in 0.002s
2014-04-01 19:20:03 (98.1 MB/s) - `XS62E010.xsupdate' saved [252927]
--2014-04-01 19:20:03-- ftp://192.168.10.5/FTP/xen62/XS62E011.xsupdate
=> `XS62E011.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E011.xsupdate ... done.
Length: 845698 (826K)
100%[==============================================================================================================================>] 845,698 --.-K/s in 0.008s
2014-04-01 19:20:03 (101 MB/s) - `XS62E011.xsupdate' saved [845698]
--2014-04-01 19:20:03-- ftp://192.168.10.5/FTP/xen62/XS62E012.xsupdate
=> `XS62E012.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E012.xsupdate ... done.
Length: 35767767 (34M)
100%[==============================================================================================================================>] 35,767,767 52.5M/s in 0.6s
2014-04-01 19:20:03 (52.5 MB/s) - `XS62E012.xsupdate' saved [35767767]
--2014-04-01 19:20:03-- ftp://192.168.10.5/FTP/xen62/XS62E014.xsupdate
=> `XS62E014.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62E014.xsupdate ... done.
Length: 1745433 (1.7M)
100%[==============================================================================================================================>] 1,745,433 10.6M/s in 0.2s
2014-04-01 19:20:04 (10.6 MB/s) - `XS62E014.xsupdate' saved [1745433]
--2014-04-01 19:20:04-- ftp://192.168.10.5/FTP/xen62/XS62ESP1002.xsupdate
=> `XS62ESP1002.xsupdate'
==> CWD not required.
==> PASV ... done. ==> RETR XS62ESP1002.xsupdate ... done.
Length: 1744985 (1.7M)
100%[==============================================================================================================================>] 1,744,985 --.-K/s in 0.02s
2014-04-01 19:20:04 (95.1 MB/s) - `XS62ESP1002.xsupdate' saved [1744985]
sleeping in 60 secs
Uploading Update xs62E001.xsupdate...
Operation failed. Error: file '/tmp/Updates/xs62E001.xsupdate' does not exist
installing Update xs62E001.xsupdate...
The uuid you supplied was invalid.
type: pool_patch
uuid:
sleeping in 60 secs
Uploading Update XS62E001.xsupdate...
Operation failed. Error: file '/tmp/Updates/XS62E001.xsupdate' does not exist
installing Update XS62E001.xsupdate...
The uuid you supplied was invalid.
type: pool_patch
uuid:
sleeping in 60 secs
Uploading Update xs62E002.xsupdate...
Operation failed. Error: file '/tmp/Updates/xs62E002.xsupdate' does not exist
installing Update xs62E002.xsupdate...
The uuid you supplied was invalid.
type: pool_patch
uuid:
sleeping in 60 secs
Uploading Update XS62E002.xsupdate...
Operation failed. Error: file '/tmp/Updates/XS62E002.xsupdate' does not exist
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)