/etc/rc.d/sysctl: WARNING: sysctl current does not exist.

During startup of my 7.4-RELEASE-p3 I get these messages:
Code:
[B]/etc/rc.d/sysctl: WARNING: sysctl current does not exist.
/etc/rc.d/sysctl: WARNING: sysctl ====== does not exist.
/etc/rc.d/sysctl: WARNING: sysctl 7.4-Release does not exist.[/B]

My /etc/rc.d/sysctl:
Code:
# cat /etc/rc.d/sysctl
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/sysctl,v 1.17.2.2.8.1 2010/12/21 17:10:29 kensmith Exp $
#

# PROVIDE: sysctl
# REQUIRE: root
# BEFORE:  DAEMON

. /etc/rc.subr

name="sysctl"
stop_cmd=":"
start_cmd="sysctl_start"
reload_cmd="sysctl_start"
lastload_cmd="sysctl_start last"
extra_commands="reload lastload"

#
# Read in a file containing sysctl settings and set things accordingly.
#
parse_file()
{
        if [ -f $1 ]; then
                while read var comments
                do
                        case ${var} in
                        \#*|'')
                                ;;
                        *)
                                mib=${var%=*}
                                val=${var#*=}

                                if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then
                                        case ${current_value} in
                                        ${val})
                                                ;;
                                        *)
                                                sysctl "${var}"
                                                ;;
                                        esac
                                elif [ "$2" = "last" ]; then
                                        warn "sysctl ${mib} does not exist."
                                fi
                                ;;
                        esac
                done < $1
        fi
}

sysctl_start()
{

        parse_file /etc/sysctl.conf $1
        parse_file /etc/sysctl.conf.local $1
}

load_rc_config $name
run_rc_command "$1"
 
BTW I don't know what's wrong:
Code:
# cat /etc/sysctl.conf
current version
compat.linux.osrelease=2.6.16
=======
# $FreeBSD: src/etc/sysctl.conf,v 1.8.38.1 2010/12/21 17:10:29 kensmith Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
7.4-RELEASE
 
Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.
 
  • Thanks
Reactions: ccc
wblock@ said:
Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.

Thanks and
Code:
compat.linux.osrelease=2.6.16
should I leave?
 
That's the default version already, at least on 9-stable. Comment it out and check the default value after rebooting:
% sysctl compat.linux.osrelease

If it's already that value, it would be better not to have that entry.
 
Back
Top