Project

General

Profile

Actions

Bug #3626

closed

rc.start_packages called twice on startup if WAN is set to DHCP

Added by Gunther Jauch over 10 years ago. Updated over 8 years ago.

Status:
Not a Bug
Priority:
Normal
Assignee:
-
Category:
Package System
Target version:
-
Start date:
04/26/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

Hi,

rc.start_packages: Restarting/Starting all packages is called twice at boot!

Apr 22 17:23:26     php: rc.newwanip: rc.newwanip: Informational is starting sk0.
Apr 22 17:23:26     php: rc.newwanip: rc.newwanip: on (IP address: 192.168.178.45) (interface: wan) (real interface: sk0).
Apr 22 17:23:26     php: rc.newwanip: ,,1,dhcp, // thats my debug output of the if() false, false, true !
Apr 22 17:23:27     php: rc.newwanip: ROUTING: setting default route to 192.168.178.1
Apr 22 17:23:28     php: rc.bootup: ROUTING: setting default route to 192.168.178.1
Apr 22 17:23:29     check_reload_status: Updating all dyndns
Apr 22 17:23:32     php: rc.newwanip: Resyncing OpenVPN instances for interface WAN.
Apr 22 17:23:32     php: rc.newwanip: Creating rrd update script
Apr 22 17:23:33     php: rc.bootup: Creating rrd update script
Apr 22 17:23:33     syslogd: exiting on signal 15
Apr 22 17:23:33     syslogd: kernel boot file is /boot/kernel/kernel

Apr 22 17:23:34     php: rc.start_packages: Restarting/Starting all packages.
Apr 22 17:23:34     php: rc.newwanip: pfSense package system has detected an ip change 192.168.178.45 -> 192.168.178.45 ... Restarting packages.

See the last line...

pfSense package system has detected an ip change 192.168.178.45 -> 192.168.178.45 ... Restarting packages.

The IP is identical! There is no need for the restart!

The restart is caused by the following if-statement inside the /etc/rc.newwanip script

if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interfaces'][$interface]['ipaddr']))

The first 2 conditions are fine... the 3.rd returns true because the value of [b]$config['interfaces'][$interface]['ipaddr'][/b] is the string "dhcp"

cu gunther

Actions

Also available in: Atom PDF