Originally posted by: MuppanaLalitaPrasad
Hi All,
I am using "shutdown -r now" to reboot the AIX 7.1 box and the system is rebooting but it is not invoking the shutdown notify script registered with the PdAt ODM at sometimes.
Our requirement is to invoke some script whenever there is a reboot of the system using shutdown command after unmounting all the filesystems. Added the following stanza to the PdAt odm.
PdAt:
uniquetype = "xyz/shutdown/driver"
attribute = "shutdown_notify"
deflt = "/etc/shutdown_notify.sh"
values = ""
width = ""
type = ""
generic = ""
rep = ""
nls_index = 0
And as per the line number 1375 in /usr/sbin/shutdown,
------------------------------------8<-----------------------------------------------
-
added the following for feature 207332
COMMANDS=`odmget -q "attribute = shutdown_notify" PdAt | grep deflt | cut -f 2 -d \"`
------------------------------------8<-----------------------------------------------
the shutdown script is going to store the shutdown notification scripts in the variable COMMANDS. But the value of this variable is NULL at some times and is failed to invoke the shutdown notification script /etc/shutdown_notify.sh. But after line number 1375, when we are capturing the complete PdAt odm using "odmget PdAt" command, we are able to see the above mentioned stanza in it. So our observation is that PdAt ODM is not consistent.
The details of the AIX box are
bash-3.2# oslevel -r
7100-01
bash-3.2# oslevel -s
7100-01-04-1216
bash-3.2#
Please let me know whether this is a known bug or not. If it is so, then in which TL, the fix is available?
Please let me know if you need any information in order to know more about this issue.
With Regards,
Prasad