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



## ccc (Mar 7, 2012)

During startup of my 7.4-RELEASE-p3 I get these messages:
	
	



```
[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]
```

*M*y /etc/rc.d/sysctl:

```
# 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"
```


----------



## wblock@ (Mar 7, 2012)

Check the contents of /etc/sysctl.conf.


----------



## ccc (Mar 7, 2012)

BTW I don't know what's wrong:
	
	



```
# 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
```


----------



## SirDice (Mar 7, 2012)

You skipped this file during mergemaster(8). Just remove the entire content except the remarks.


----------



## ccc (Mar 7, 2012)

Thanks a lot it works well now.


----------



## wblock@ (Mar 8, 2012)

Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.


----------



## ccc (Mar 8, 2012)

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 
	
	



```
compat.linux.osrelease=2.6.16
```
 should I leave?


----------



## wblock@ (Mar 8, 2012)

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.


----------

