Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2012 16:36:01 GMT
From:      Olivier Smedts <olivier@gid0.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   amd64/174595: /etc/rc.d/sysctl : unknown oid 'XXX'
Message-ID:  <201212201636.qBKGa1ZH082714@red.freebsd.org>
Resent-Message-ID: <201212201640.qBKGe0IF072281@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174595
>Category:       amd64
>Synopsis:       /etc/rc.d/sysctl : unknown oid 'XXX'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 20 16:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Smedts
>Release:        10-CURRENT
>Organization:
>Environment:
FreeBSD zozo.afpicl.lan 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r244488: Thu Dec 20 15:21:07 CET 2012     root@zozo.afpicl.lan:/usr/obj/usr/src/sys/CORE  amd64
>Description:
Since the last commit (r244198) to /usr/src/etc/rc.d/sysctl, I've got this error at startup just after root is mounted :

sysctl: unknown oid 'compat.linux.osrelease' at line 22: No such file or directory

This is somewhat expected, because the linux compat kmod is only loaded after that by /etc/rc.d/abi (because of linux_enable="YES" in /etc/rc.conf, which is a common use case).

The problem is that... there was no error before. I think the problem comes from the rewritten /usr/src/etc/rc.d/sysctl, which used ">/dev/null 2>&1" to avoid startup errors from being displayed.
>How-To-Repeat:
# echo 'compat.linux.osrelease=2.6.32' >> /etc/sysctl.conf
# echo 'linux_enable="YES"' >> /etc/rc.conf
# sed -i '' 's/^linux_load=/#linux_load=/' /boot/loader.conf
# shutdown -r now
>Fix:
Add "2>&1" after "> /dev/null" in /usr/src/etc/rc.d/sysctl

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212201636.qBKGa1ZH082714>