diff --git a/src/etc/devd/carp.conf b/src/etc/devd/carp.conf index 9451eaee0..7c8e41527 100644 --- a/src/etc/devd/carp.conf +++ b/src/etc/devd/carp.conf @@ -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"; }; diff --git a/src/etc/devd/ifnet.conf b/src/etc/devd/ifnet.conf index ef56acaea..cf92f0d43 100644 --- a/src/etc/devd/ifnet.conf +++ b/src/etc/devd/ifnet.conf @@ -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"; }; # diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index 13841e8c8..5973f4069 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -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 } diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index e9af055d3..cf0297e09 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -5198,7 +5198,7 @@ function interface_setup_pppoe_reset_file($pppif, $iface = '') if(!empty($iface) && !empty($pppif)){ $cron_cmd = <<> ${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 diff --git a/src/opnsense/service/configd.py b/src/opnsense/service/configd.py index a5ac09b92..94c53e5b1 100755 --- a/src/opnsense/service/configd.py +++ b/src/opnsense/service/configd.py @@ -1,4 +1,4 @@ -#!/usr/local/bin/python2.7 +#!/usr/bin/env python2.7 """ Copyright (c) 2014 Ad Schellevis diff --git a/src/opnsense/service/configd_ctl.py b/src/opnsense/service/configd_ctl.py index 09ff1891d..ab5129a56 100755 --- a/src/opnsense/service/configd_ctl.py +++ b/src/opnsense/service/configd_ctl.py @@ -1,4 +1,4 @@ -#!/usr/local/bin/python2.7 +#!/usr/bin/env python2.7 """ Copyright (c) 2015 Ad Schellevis diff --git a/src/opnsense/service/execute_command.py b/src/opnsense/service/execute_command.py index c28a7063e..d71404a29 100755 --- a/src/opnsense/service/execute_command.py +++ b/src/opnsense/service/execute_command.py @@ -1,4 +1,4 @@ -#!/usr/local/bin/python2.7 +#!/usr/bin/env python2.7 """ Copyright (c) 2014 Ad Schellevis diff --git a/src/opnsense/service/modules/daemonize.py b/src/opnsense/service/modules/daemonize.py index 07846b7cc..118008b5a 100644 --- a/src/opnsense/service/modules/daemonize.py +++ b/src/opnsense/service/modules/daemonize.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2.7 # original source from https://github.com/thesharp/daemonize diff --git a/src/sbin/configctl b/src/sbin/configctl new file mode 100755 index 000000000..e4a6997a3 --- /dev/null +++ b/src/sbin/configctl @@ -0,0 +1,4 @@ +#!/bin/sh + +# launch the real utility from here +/usr/local/opnsense/service/configd_ctl.py "${@}" diff --git a/src/sbin/ovpn-linkdown b/src/sbin/ovpn-linkdown index bf11c5b6c..f4855db17 100755 --- a/src/sbin/ovpn-linkdown +++ b/src/sbin/ovpn-linkdown @@ -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 diff --git a/src/sbin/ovpn-linkup b/src/sbin/ovpn-linkup index 53cbf2cf1..4410d546c 100755 --- a/src/sbin/ovpn-linkup +++ b/src/sbin/ovpn-linkup @@ -1,7 +1,7 @@ #!/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 diff --git a/src/sbin/ppp-linkdown b/src/sbin/ppp-linkdown index dc6408eea..0ee03feca 100755 --- a/src/sbin/ppp-linkdown +++ b/src/sbin/ppp-linkdown @@ -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 diff --git a/src/sbin/ppp-linkup b/src/sbin/ppp-linkup index 40bc7fd3f..c4f64ab08 100755 --- a/src/sbin/ppp-linkup +++ b/src/sbin/ppp-linkup @@ -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