Scripting with wireless network cards
Ben Scott
dragonhawk at gmail.com
Sun Jun 3 21:26:19 EDT 2007
On 6/3/07, Kjel Anderson <kjel.anderson at gmail.com> wrote:
> I'd like to learn more about what is happening under the hood ...
> Does anyone have any suggestion where I should start?
To learn about what "ifup", "ifdown", and friends do:
First, try "man ifup", "man ifdown", and so on. Follow references
to other commands and files, especially in "SEE ALSO" sections.
Find out what package contains the relevant files, and see if there
is non-manpage documentation. This typically appears under
/usr/share/doc/ for the package name. For example, on my Fedora 6
system:
$ rpm -qf `which ifup`
initscripts-8.45.7-1
$ cd /usr/share/doc/initscripts-8.45.7
$ ls
...
Check the logs. You can see recent kernel log messages with
"dmesg". Pipe it through "less" for more control, i.e., "dmesg |
less". Other logs will typically be found somewhere under the
/var/log/ directory.
Finally, you can read the source. Use "which ifup" to find the
actual file -- on my Fedora 6 box, it's /sbin/ifup. Then use the
file(1) command to determine the type of file. Again on my box:
$ file /sbin/ifup
/sbin/ifup: Bourne-Again shell script text executable
Since that's a shell script, I can read it directly. If it was a
binary, I could pull the source package, and look at that.
That should get you started. :-)
-- Ben
More information about the gnhlug-discuss
mailing list