You can short-cut the whole thing and arrange for the VMCP driver to be loaded on demand. But that's a whole other conversation.
On 10/09/2014 11:56 AM, Michael MacIsaac wrote: > You guessed it - but how about this: > > which vmcp >/dev/null 2>&1 > if [ $? != 0 ]; then > modprobe vmcp > fi The 'which' is going to look for the 'vmcp' command, not the "vmcp" kernel module nor for the device file. The /command/ is likely to always be present (on this HW). _Just go ahead and do a '__modprobe vmcp 2> /dev/null__' or similar. Then do the '__vmcp__' and take your cues from there. _ *** details *** Three cases fall out of that: * 'modprobe' worked and the module was loaded * 'modprobe' failed because VMCP is statically linked * 'modprobe' failed but VMCP is not statically linked In the first two cases, a 'vmcp' command will then succeed. (Assuming device inode is present, which is likely.) Good. In the latter case, 'vmcp' will fail, so there's an indication that something is in fact wrong. On-demand loading is better than all this, but the effect seen in the shell where you're trying to 'vmcp' is the same. -- R; <>< -- Rick Troth Senior Software Developer Velocity Software Inc. Mountain View, CA 94041 Main: (877) 964-8867 Direct: (614) 594-9768 [email protected] <mailto:[email protected]> ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
