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 @@
notify 100 {
match "system" "CARP";
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 {
match "system" "CARP";
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 {
match "system" "IFNET";
match "type" "LINK_UP";
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 {
match "system" "IFNET";
match "type" "LINK_DOWN";
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 {
match "system" "IFNET";
match "type" "LINK_UP";
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 {
match "system" "IFNET";
match "type" "LINK_DOWN";
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;
## These parameters can be overridden in a specific alarm configuration
alarm default {
command on "/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 '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 -m 'dyndns reload %T' 'ipsecdns reload' 'openvpn reload %T' 'filter reload' "
combine 10s
}
......
......@@ -5198,7 +5198,7 @@ function interface_setup_pppoe_reset_file($pppif, $iface = '')
if(!empty($iface) && !empty($pppif)){
$cron_cmd = <<<EOD
#!/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}"
EOD;
......
......@@ -548,7 +548,7 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
$hostnames = "";
array_unique($filterdns_list);
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);
unset($hostnames);
......
......@@ -826,7 +826,7 @@ EOD;
$hostnames = "";
array_unique($filterdns_list);
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);
unset($hostnames);
......
......@@ -24,7 +24,7 @@ configd_load_rc_config()
required_files=""
command_args="${required_args}"
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
echo
# upgrade all packages if possible
pkg upgrade -y
pkg autoremove -y
pkg clean -y
opnsense-update -p
echo
......@@ -54,8 +52,7 @@ echo
echo
# if we can update base, we'll do that as well
if opnsense-update -c; then
opnsense-update && /usr/local/etc/rc.reboot
else
opnsense-update
fi
REBOOT=
opnsense-update -c -bk && REBOOT=1
opnsense-update -bk
[ -n "${REBOOT}" ] /usr/local/etc/rc.reboot
......@@ -40,18 +40,12 @@ if [ -z "$pkg_running" ]; then
echo '***STARTING UPGRADE***' >> ${PKG_PROGRESS_FILE}
if [ "$package" == "all" ]; then
# update all installed packages
pkg upgrade -y >> ${PKG_PROGRESS_FILE}
pkg autoremove -y >> ${PKG_PROGRESS_FILE}
pkg clean -y >> ${PKG_PROGRESS_FILE}
opnsense-update -p >> ${PKG_PROGRESS_FILE}
# restart the web server
/usr/local/etc/rc.restart_webgui >> ${PKG_PROGRESS_FILE}
# if we can update base, we'll do that as well
if opnsense-update -c; then
echo "!!!!!!!!!!!! ATTENTION !!!!!!!!!!!" >> ${PKG_PROGRESS_FILE}
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
if opnsense-update -c -bk; then
if opnsense-update -bk >> ${PKG_PROGRESS_FILE}; then
REBOOT=1
fi
fi
......
#!/usr/local/bin/python2.7
#!/usr/bin/env python2.7
"""
Copyright (c) 2014 Ad Schellevis
......
#!/usr/local/bin/python2.7
#!/usr/bin/env python2.7
"""
Copyright (c) 2015 Ad Schellevis
......
#!/usr/local/bin/python2.7
#!/usr/bin/env python2.7
"""
Copyright (c) 2014 Ad Schellevis
......
#!/usr/bin/python
#!/usr/bin/env python2.7
# 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 @@
/bin/rm -f /var/etc/nameserver_$1
/bin/rm -f /tmp/$1_router
/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
# 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 [ "" != "$route_vpn_gateway" ]; then
......@@ -13,5 +13,5 @@ fi
/usr/bin/touch /tmp/$1up
# reload filter
/usr/local/opnsense/service/configd_ctl.py "interface newip $1"
/usr/local/opnsense/service/configd_ctl.py interface newip $1
exit 0
......@@ -28,4 +28,4 @@ fi
/bin/rm -f /tmp/${IF}_router
/bin/rm -f /tmp/${IF}up
/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
echo "${DNS2}" >> /var/etc/nameserver_${1}
route change "${DNS2}" ${4}
fi
/usr/local/opnsense/service/configd_ctl.py 'dns reload'
/usr/local/opnsense/service/configd_ctl.py dns reload
sleep 1
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
# let the configuration system know that the ipv6 has changed.
......@@ -53,10 +53,10 @@ elif [ "${2}" == "inet6" ]; then
echo "${DNS2}" >> /var/etc/nameserver_v6${1}
route change -inet6 "${DNS2}" ${4}
fi
/usr/local/opnsense/service/configd_ctl.py 'dns reload'
/usr/local/opnsense/service/configd_ctl.py dns reload
sleep 1
fi
/usr/local/opnsense/service/configd_ctl.py "interface newipv6 ${1}"
/usr/local/opnsense/service/configd_ctl.py interface newipv6 ${1}
fi
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