1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General' started by ccc, Mar 7, 2012.

  1. ccc

    ccc New Member

    Messages:
    609
    Likes Received:
    0
    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"
    
     
  2. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,168
    Likes Received:
    7
    Check the contents of /etc/sysctl.conf.
     
  3. ccc

    ccc New Member

    Messages:
    609
    Likes Received:
    0
    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
    
     
  4. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,369
    Likes Received:
    0
    You skipped this file during mergemaster(8). Just remove the entire content except the remarks.
     
  5. ccc

    ccc New Member

    Messages:
    609
    Likes Received:
    0
    Thanks a lot it works well now.
     
  6. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,168
    Likes Received:
    7
    Like the error messages said, "current version" and "7.4-RELEASE" are not valid sysctls, and should not be in there.
     
  7. ccc

    ccc New Member

    Messages:
    609
    Likes Received:
    0
    Thanks and
    Code:
    compat.linux.osrelease=2.6.16
    should I leave?
     
  8. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,168
    Likes Received:
    7
    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.