FreeBSD 6.3/amd64: ng_ipacct "Depends on kernel" ?? why? when?

Eugene Kazarinov kamuzon at milshop.ru
Thu Aug 7 02:50:50 UTC 2008


>
> > # $FreeBSD: ports/net-mgmt/ng_ipacct/Makefile,v 1.9 2008/06/02
> > NO_PACKAGE=     "Depends on kernel"
> >
> > # $FreeBSD: ports/net-mgmt/ng_ipacct/Makefile,v 1.10 2008/08/05
> > IGNORE=         "Depends on kernel"
> >
> >
> >
> > Should I change IGNORE to NO_PACKAGE and it should works fine for me?
> > Or something would wrong?
>
> Seems like it, although if you aren't building packages then it
> shouldn't matter either way..
>
> It does seem odd that it changed to IGNORE - NO_PACKAGE could be OK to
> use by itself.
>
> The logic for that doesn't really make sense either.. I CC'd the port
> maintainer about it.
>

Thank you a lot.


By the way I have one more question to port mantainer (dont know who is
this).

in rc.conf I have this line
ng_ipacct_enable="YES"


Sample ng_ipacct.conf contains these lines

#ng_ipacct_enable="YES"
ng_ipacct_modules_load="YES"
ng_ipacct_modules_list="netgraph ng_ether ng_ipacct"

after boot with these lines in config file I got in /var/log/messages:

Aug  7 06:15:49 ph26 root: /etc/rc: WARNING: can not load kld module
netgraph
Aug  7 06:15:49 ph26 kernel: kldload: /boot/kernel/ng_ether.ko: Unsupported
file type
Aug  7 06:15:49 ph26 kernel: module_register: module ng_ether already
exists!
Aug  7 06:15:49 ph26 kernel: Module ng_ether failed to register: 17
Aug  7 06:15:49 ph26 root: /etc/rc: WARNING: can not load kld module
ng_ether
Aug  7 06:15:49 ph26 kernel: kldload: /boot/modules/ng_ipacct.ko:
Unsupported file type

IP accounting is working!



If I change lines to

#ng_ipacct_enable="YES"
ng_ipacct_modules_load="YES"
ng_ipacct_modules_list=""

I got

Aug  7 06:20:22 ph26 kernel: kldload: /boot/modules/ng_ipacct.ko:
Unsupported file type

IP accounting is still working!



And If I change they to

#ng_ipacct_enable="YES"
#ng_ipacct_modules_load="YES"
#ng_ipacct_modules_list="netgraph ng_ether ng_ipacct"

I got

Aug  7 06:11:53 ph26 root: /etc/rc: WARNING: $ng_ipacct_modules_load is not
set properly - see rc.conf(5).
Aug  7 06:11:53 ph26 kernel: kldload: /boot/modules/ng_ipacct.ko:
Unsupported file type

IP accounting is still working!


Wonderful! :-\

So, as I understand all needed modules loading by kernel "by default"?!
And as I understand, module ng_ipacct.ko is not needed to the system for IP
accounting?! because its not loaded in working system (and it's not working
(isnt it?)) because it is "Unsupported file type"?!
So, from that port (ng_ipacct) on up-to-date FreeBSD-systems people need
only executable (/usr/local/etc/rc.d/ng_ipacct) and conf
(/usr/local/etc/rc.d/ng_ipacct.conf.sample renamed to
/usr/local/etc/rc.d/ng_ipacct.conf) files? Nor kernel module?!


So, If I dont want to get error response "kernel: kldload:
/boot/modules/ng_ipacct.ko: Unsupported file type" in /var/log/messages
then I could remove /boot/modules/ng_ipacct.ko and
/boot/modules/linker.hints
last one containes:

01 00 00 00 1C 00 00 00 02 00 00 00 09 6E 67 5F 69 70 61 63
............ng_ipac
63 74 0C 6E 67 5F 69 70 61 63 63 74 2E 6B 6F 00
ct.ng_ipacct.ko.

and all'll works fine after that?

I'm afraid to delete these files, because I think system can becomes
unbootable. Isn't it?


PS uname -a
FreeBSD ph26.yaol.ru 6.3-STABLE FreeBSD 6.3-STABLE #0: Thu Aug  7 05:32:15
MSD 2008     kamuzon at ph26.yaol.ru:/usr/obj/usr/src/sys/KMD  amd64

PPS sorry for my english


Thanks in advance.


More information about the freebsd-stable mailing list