Commit cfcceaa1 authored by Ad Schellevis's avatar Ad Schellevis

Merge branch 'master' of ssh://github.com/opnsense/core

parents 43955298 4d101e7c
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
notify 100 { notify 100 {
match "system" "CARP"; match "system" "CARP";
match "type" "MASTER"; match "type" "MASTER";
action "/usr/local/opnsense/service/configd_ctl.py 'interface carpmaster $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface carpmaster $subsystem";
}; };
notify 100 { notify 100 {
match "system" "CARP"; match "system" "CARP";
match "type" "BACKUP"; match "type" "BACKUP";
action "/usr/local/opnsense/service/configd_ctl.py 'interface carpbackup $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface carpbackup $subsystem";
}; };
...@@ -7,28 +7,28 @@ notify 101 { ...@@ -7,28 +7,28 @@ notify 101 {
match "system" "IFNET"; match "system" "IFNET";
match "type" "LINK_UP"; match "type" "LINK_UP";
media-type "ethernet"; media-type "ethernet";
action "/usr/local/opnsense/service/configd_ctl.py 'interface linkup start $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface linkup start $subsystem";
}; };
notify 101 { notify 101 {
match "system" "IFNET"; match "system" "IFNET";
match "type" "LINK_DOWN"; match "type" "LINK_DOWN";
media-type "ethernet"; media-type "ethernet";
action "/usr/local/opnsense/service/configd_ctl.py 'interface linkup stop $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface linkup stop $subsystem";
}; };
notify 101 { notify 101 {
match "system" "IFNET"; match "system" "IFNET";
match "type" "LINK_UP"; match "type" "LINK_UP";
media-type "802.11"; media-type "802.11";
action "/usr/local/opnsense/service/configd_ctl.py 'interface linkup start $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface linkup start $subsystem";
}; };
notify 101 { notify 101 {
match "system" "IFNET"; match "system" "IFNET";
match "type" "LINK_DOWN"; match "type" "LINK_DOWN";
media-type "802.11"; media-type "802.11";
action "/usr/local/opnsense/service/configd_ctl.py 'interface linkup stop $subsystem'"; action "/usr/local/opnsense/service/configd_ctl.py interface linkup stop $subsystem";
}; };
# #
......
...@@ -103,8 +103,8 @@ rrd interval 60s; ...@@ -103,8 +103,8 @@ rrd interval 60s;
## These parameters can be overridden in a specific alarm configuration ## These parameters can be overridden in a specific alarm configuration
alarm default { alarm default {
command on "/usr/local/opnsense/service/configd_ctl.py 'dyndns reload %T' 'ipsecdns reload' 'openvpn reload %T' 'filter reload' " command on "/usr/local/opnsense/service/configd_ctl.py -m 'dyndns reload %T' 'ipsecdns reload' 'openvpn reload %T' 'filter reload' "
command off "/usr/local/opnsense/service/configd_ctl.py 'dyndns reload %T' 'ipsecdns reload' 'openvpn reload %T' 'filter reload' " command off "/usr/local/opnsense/service/configd_ctl.py -m 'dyndns reload %T' 'ipsecdns reload' 'openvpn reload %T' 'filter reload' "
combine 10s combine 10s
} }
......
...@@ -5198,7 +5198,7 @@ function interface_setup_pppoe_reset_file($pppif, $iface = '') ...@@ -5198,7 +5198,7 @@ function interface_setup_pppoe_reset_file($pppif, $iface = '')
if(!empty($iface) && !empty($pppif)){ if(!empty($iface) && !empty($pppif)){
$cron_cmd = <<<EOD $cron_cmd = <<<EOD
#!/bin/sh #!/bin/sh
/usr/local/opnsense/service/configd_ctl.py 'interface reconfigure {$iface}' /usr/local/opnsense/service/configd_ctl.py interface reconfigure {$iface}
/usr/bin/logger -t {$pppif} "PPPoE periodic reset executed on {$iface}" /usr/bin/logger -t {$pppif} "PPPoE periodic reset executed on {$iface}"
EOD; EOD;
......
...@@ -548,7 +548,7 @@ function system_staticroutes_configure($interface = "", $update_dns = false) { ...@@ -548,7 +548,7 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
$hostnames = ""; $hostnames = "";
array_unique($filterdns_list); array_unique($filterdns_list);
foreach ($filterdns_list as $hostname) foreach ($filterdns_list as $hostname)
$hostnames .= "cmd {$hostname} '/usr/local/opnsense/service/configd_ctl.py \"routedns reload\"'\n"; $hostnames .= "cmd {$hostname} '/usr/local/opnsense/service/configd_ctl.py routedns reload'\n";
file_put_contents("/var/etc/filterdns-route.hosts", $hostnames); file_put_contents("/var/etc/filterdns-route.hosts", $hostnames);
unset($hostnames); unset($hostnames);
......
...@@ -826,7 +826,7 @@ EOD; ...@@ -826,7 +826,7 @@ EOD;
$hostnames = ""; $hostnames = "";
array_unique($filterdns_list); array_unique($filterdns_list);
foreach ($filterdns_list as $hostname) foreach ($filterdns_list as $hostname)
$hostnames .= "cmd {$hostname} '/usr/local/opnsense/service/configd_ctl.py \"ipsecdns reload\"'\n"; $hostnames .= "cmd {$hostname} '/usr/local/opnsense/service/configd_ctl.py ipsecdns reload'\n";
file_put_contents("/usr/local/etc/filterdns-ipsec.hosts", $hostnames); file_put_contents("/usr/local/etc/filterdns-ipsec.hosts", $hostnames);
unset($hostnames); unset($hostnames);
......
...@@ -24,7 +24,7 @@ configd_load_rc_config() ...@@ -24,7 +24,7 @@ configd_load_rc_config()
required_files="" required_files=""
command_args="${required_args}" command_args="${required_args}"
command=/usr/local/opnsense/service/configd.py command=/usr/local/opnsense/service/configd.py
command_interpreter=/usr/local/bin/python2.7 command_interpreter="/usr/bin/env python2.7"
} }
# #
......
...@@ -42,9 +42,7 @@ esac ...@@ -42,9 +42,7 @@ esac
echo echo
# upgrade all packages if possible # upgrade all packages if possible
pkg upgrade -y opnsense-update -p
pkg autoremove -y
pkg clean -y
echo echo
...@@ -54,8 +52,7 @@ echo ...@@ -54,8 +52,7 @@ echo
echo echo
# if we can update base, we'll do that as well # if we can update base, we'll do that as well
if opnsense-update -c; then REBOOT=
opnsense-update && /usr/local/etc/rc.reboot opnsense-update -c -bk && REBOOT=1
else opnsense-update -bk
opnsense-update [ -n "${REBOOT}" ] /usr/local/etc/rc.reboot
fi
...@@ -40,18 +40,12 @@ if [ -z "$pkg_running" ]; then ...@@ -40,18 +40,12 @@ if [ -z "$pkg_running" ]; then
echo '***STARTING UPGRADE***' >> ${PKG_PROGRESS_FILE} echo '***STARTING UPGRADE***' >> ${PKG_PROGRESS_FILE}
if [ "$package" == "all" ]; then if [ "$package" == "all" ]; then
# update all installed packages # update all installed packages
pkg upgrade -y >> ${PKG_PROGRESS_FILE} opnsense-update -p >> ${PKG_PROGRESS_FILE}
pkg autoremove -y >> ${PKG_PROGRESS_FILE}
pkg clean -y >> ${PKG_PROGRESS_FILE}
# restart the web server # restart the web server
/usr/local/etc/rc.restart_webgui >> ${PKG_PROGRESS_FILE} /usr/local/etc/rc.restart_webgui >> ${PKG_PROGRESS_FILE}
# if we can update base, we'll do that as well # if we can update base, we'll do that as well
if opnsense-update -c; then if opnsense-update -c -bk; then
echo "!!!!!!!!!!!! ATTENTION !!!!!!!!!!!" >> ${PKG_PROGRESS_FILE} if opnsense-update -bk >> ${PKG_PROGRESS_FILE}; then
echo "A kernel/base upgrade is required." >> ${PKG_PROGRESS_FILE}
echo "try to perform immediately" >> ${PKG_PROGRESS_FILE}
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ${PKG_PROGRESS_FILE}
if opnsense-update >> ${PKG_PROGRESS_FILE}; then
REBOOT=1 REBOOT=1
fi fi
fi fi
......
#!/usr/local/bin/python2.7 #!/usr/bin/env python2.7
""" """
Copyright (c) 2014 Ad Schellevis Copyright (c) 2014 Ad Schellevis
......
#!/usr/local/bin/python2.7 #!/usr/bin/env python2.7
""" """
Copyright (c) 2015 Ad Schellevis Copyright (c) 2015 Ad Schellevis
......
#!/usr/local/bin/python2.7 #!/usr/bin/env python2.7
""" """
Copyright (c) 2014 Ad Schellevis Copyright (c) 2014 Ad Schellevis
......
#!/usr/bin/python #!/usr/bin/env python2.7
# original source from https://github.com/thesharp/daemonize # original source from https://github.com/thesharp/daemonize
......
#!/bin/sh
# launch the real utility from here
/usr/local/opnsense/service/configd_ctl.py "${@}"
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
/bin/rm -f /var/etc/nameserver_$1 /bin/rm -f /var/etc/nameserver_$1
/bin/rm -f /tmp/$1_router /bin/rm -f /tmp/$1_router
/bin/rm -f /tmp/$1up /bin/rm -f /tmp/$1up
/usr/local/opnsense/service/configd_ctl.py 'filter reload' /usr/local/opnsense/service/configd_ctl.py filter reload
#!/bin/sh #!/bin/sh
# let the configuration system know that the ip has changed. # let the configuration system know that the ip has changed.
# /usr/local/opnsense/service/configd_ctl.py "interface newip $interface" # /usr/local/opnsense/service/configd_ctl.py interface newip $interface
if [ "${dev_type}" = "tun" ]; then if [ "${dev_type}" = "tun" ]; then
if [ "" != "$route_vpn_gateway" ]; then if [ "" != "$route_vpn_gateway" ]; then
...@@ -13,5 +13,5 @@ fi ...@@ -13,5 +13,5 @@ fi
/usr/bin/touch /tmp/$1up /usr/bin/touch /tmp/$1up
# reload filter # reload filter
/usr/local/opnsense/service/configd_ctl.py "interface newip $1" /usr/local/opnsense/service/configd_ctl.py interface newip $1
exit 0 exit 0
...@@ -28,4 +28,4 @@ fi ...@@ -28,4 +28,4 @@ fi
/bin/rm -f /tmp/${IF}_router /bin/rm -f /tmp/${IF}_router
/bin/rm -f /tmp/${IF}up /bin/rm -f /tmp/${IF}up
/bin/rm -f /tmp/${IF}_ip /bin/rm -f /tmp/${IF}_ip
/usr/local/opnsense/service/configd_ctl.py 'dns reload' /usr/local/opnsense/service/configd_ctl.py dns reload
...@@ -29,10 +29,10 @@ if [ "${2}" == "inet" ]; then ...@@ -29,10 +29,10 @@ if [ "${2}" == "inet" ]; then
echo "${DNS2}" >> /var/etc/nameserver_${1} echo "${DNS2}" >> /var/etc/nameserver_${1}
route change "${DNS2}" ${4} route change "${DNS2}" ${4}
fi fi
/usr/local/opnsense/service/configd_ctl.py 'dns reload' /usr/local/opnsense/service/configd_ctl.py dns reload
sleep 1 sleep 1
fi fi
/usr/local/opnsense/service/configd_ctl.py "interface newip ${1}" /usr/local/opnsense/service/configd_ctl.py interface newip ${1}
elif [ "${2}" == "inet6" ]; then elif [ "${2}" == "inet6" ]; then
# let the configuration system know that the ipv6 has changed. # let the configuration system know that the ipv6 has changed.
...@@ -53,10 +53,10 @@ elif [ "${2}" == "inet6" ]; then ...@@ -53,10 +53,10 @@ elif [ "${2}" == "inet6" ]; then
echo "${DNS2}" >> /var/etc/nameserver_v6${1} echo "${DNS2}" >> /var/etc/nameserver_v6${1}
route change -inet6 "${DNS2}" ${4} route change -inet6 "${DNS2}" ${4}
fi fi
/usr/local/opnsense/service/configd_ctl.py 'dns reload' /usr/local/opnsense/service/configd_ctl.py dns reload
sleep 1 sleep 1
fi fi
/usr/local/opnsense/service/configd_ctl.py "interface newipv6 ${1}" /usr/local/opnsense/service/configd_ctl.py interface newipv6 ${1}
fi fi
exit 0 exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment