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

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

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

Postby ccc » 07 Mar 2012, 15:38

During startup of my 7.4-RELEASE-p3 I get these messages:
Code: Select all
[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 [FILE]/etc/rc.d/sysctl[/FILE]:
Code: Select all
# 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"
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby wblock@ » 07 Mar 2012, 15:40

Check the contents of [file]/etc/sysctl.conf[/file].
User avatar
wblock@
Old Fart
 
Posts: 10218
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby ccc » 07 Mar 2012, 15:43

BTW I don't know what's wrong:
Code: Select all
# 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
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby SirDice » 07 Mar 2012, 15:55

You skipped this file during [man=8]mergemaster[/man]. Just remove the entire content except the remarks.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby ccc » 07 Mar 2012, 16:16

Thanks a lot it works well now.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby wblock@ » 08 Mar 2012, 00:09

Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.
User avatar
wblock@
Old Fart
 
Posts: 10218
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby ccc » 08 Mar 2012, 00:38

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


Thanks and
Code: Select all
compat.linux.osrelease=2.6.16
should I leave?
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby wblock@ » 08 Mar 2012, 05:10

That's the default version already, at least on 9-stable. Comment it out and check the default value after rebooting:
[cmd="%"]sysctl compat.linux.osrelease[/cmd]

If it's already that value, it would be better not to have that entry.
User avatar
wblock@
Old Fart
 
Posts: 10218
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy


Return to General

Who is online

Users browsing this forum: doc1623, TeoEnMing, Yahoo [Bot], yayix and 0 guests