10484 [Solved] /etc/rc.d/sysctl: WARNING: sysctl current does not exist. - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

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

Reply
 
Thread Tools Display Modes
  #1  
Old March 7th, 2012, 16:38
ccc ccc is offline
Member
 
Join Date: Jan 2009
Posts: 549
Thanks: 201
Thanked 4 Times in 4 Posts
Default /etc/rc.d/sysctl: WARNING: sysctl current does not exist.

During startup of my 7.4-RELEASE-p3 I get these messages:
Code:
/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.
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"

Last edited by DutchDaemon; March 8th, 2012 at 00:29.
Reply With Quote
  #2  
Old March 7th, 2012, 16:40
wblock@'s Avatar
wblock@ wblock@ is online now
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,712
Thanks: 432
Thanked 1,757 Times in 1,456 Posts
Default

Check the contents of /etc/sysctl.conf.
Reply With Quote
  #3  
Old March 7th, 2012, 16:43
ccc ccc is offline
Member
 
Join Date: Jan 2009
Posts: 549
Thanks: 201
Thanked 4 Times in 4 Posts
Default

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
Reply With Quote
  #4  
Old March 7th, 2012, 16:55
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,706
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

You skipped this file during mergemaster(8). 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.
Reply With Quote
The Following User Says Thank You to SirDice For This Useful Post:
ccc (March 8th, 2012)
  #5  
Old March 7th, 2012, 17:16
ccc ccc is offline
Member
 
Join Date: Jan 2009
Posts: 549
Thanks: 201
Thanked 4 Times in 4 Posts
Default

Thanks a lot it works well now.

Last edited by DutchDaemon; March 8th, 2012 at 00:29.
Reply With Quote
  #6  
Old March 8th, 2012, 01:09
wblock@'s Avatar
wblock@ wblock@ is online now
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,712
Thanks: 432
Thanked 1,757 Times in 1,456 Posts
Default

Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.
Reply With Quote
The Following User Says Thank You to wblock@ For This Useful Post:
ccc (March 8th, 2012)
  #7  
Old March 8th, 2012, 01:38
ccc ccc is offline
Member
 
Join Date: Jan 2009
Posts: 549
Thanks: 201
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by wblock@ View Post
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?

Last edited by DutchDaemon; March 8th, 2012 at 02:36.
Reply With Quote
  #8  
Old March 8th, 2012, 06:10
wblock@'s Avatar
wblock@ wblock@ is online now
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,712
Thanks: 432
Thanked 1,757 Times in 1,456 Posts
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] can reload sysctl.conf? meeinter General 4 February 28th, 2012 01:49
how to know how many of a sysctl is used? fluca1978 General 2 February 2nd, 2012 16:53
Usage sysctl Andrew General 10 September 21st, 2009 18:43
[Solved] kenv and sysctl st3ph4n General 0 April 8th, 2009 10:17
sysctl.conf lumiwa General 5 January 11th, 2009 03:31


All times are GMT +1. The time now is 14:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0