This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
aix:bad_package_version [2021/01/01 21:24] 127.0.0.1 external edit |
aix:bad_package_version [2022/03/11 09:47] (current) manu |
||
|---|---|---|---|
| Line 51: | Line 51: | ||
| That should report that all filesets for APAR IJ07677 are installed. Additionally, running instfix -icq |grep :-: should NOT show any further issues on IJ07677. | That should report that all filesets for APAR IJ07677 are installed. Additionally, running instfix -icq |grep :-: should NOT show any further issues on IJ07677. | ||
| + | Example of script: | ||
| + | |||
| + | <cli proémpt='>'> | ||
| + | [root@aixb020]/root> cat scripts/repair_chrp.base.ServiceRM.sh | ||
| + | </cli> | ||
| + | <code> | ||
| + | #!/bin/ksh | ||
| + | #@(#) v1.0 Update the bad package value into ODM | ||
| + | |||
| + | |||
| + | #------------------------------ | ||
| + | repair_odm() | ||
| + | { | ||
| + | mkdir /tmp/odmfix | ||
| + | cd /tmp/odmfix | ||
| + | ODMDIR=/usr/lib/objrepos odmget -q name=IJ07677 fix > /tmp/odmfix/IJ07677.txt | ||
| + | cat /tmp/odmfix/IJ07677.txt | sed 's/:2\.5\.1\.20/:2\.5\.1\.2/' > /tmp/odmfix/IJ07677.txt1 | ||
| + | ODMDIR=/usr/lib/objrepos odmdelete -q name=IJ07677 -o fix | ||
| + | |||
| + | echo Add updated info to ODM: | ||
| + | |||
| + | ODMDIR=/usr/lib/objrepos odmadd /tmp/odmfix/IJ07677.txt1 | ||
| + | |||
| + | echo Confirm APAR is listed as being installed: | ||
| + | |||
| + | instfix -ik IJ07677 | ||
| + | |||
| + | echo OK | ||
| + | |||
| + | } | ||
| + | |||
| + | ############################# | ||
| + | if [[ $(ODMDIR=/usr/lib/objrepos odmget -q name=IJ07677 fix | grep -q '2.5.1.20'; echo $?) -eq "0" ]] | ||
| + | then | ||
| + | repair_odm | ||
| + | else | ||
| + | echo "ODM OK, nothing to do" | ||
| + | fi | ||
| + | </code> | ||