modinfo: Fix failure with inaccessible current dir
kerneltools bugzilla #6
<https://bugs.launchpad.net/module-init-tools/+bug/227198>
Originally report refers to "sudo modinfo fglrx"
on an NFS mount with root_sqaush. To reproduce:
$ mkdir /tmp/noaccess
$ cd /tmp/noaccess
$ chmod a-x /tmp/noaccess
$ /sbin/modinfo fglrx
$ modinfo: could not open fglrx: Permission denied
As suggested by Martin Pitt on Launchpad, the fix
is to distinguish better between module names and
filenames. If it contains "." or "/", it must be
a filename. Otherwise, assume it is a module name.
Users can still do "modinfo ./fglrx" if thats what
they really want.
Signed-off-by: Alan Jenkins <alan@alan-eeepc.jenkins>