Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
cfcceaa1
Commit
cfcceaa1
authored
Jun 08, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://github.com/opnsense/core
parents
43955298
4d101e7c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
36 additions
and
41 deletions
+36
-41
carp.conf
src/etc/devd/carp.conf
+2
-2
ifnet.conf
src/etc/devd/ifnet.conf
+4
-4
gwlb.inc
src/etc/inc/gwlb.inc
+2
-2
interfaces.inc
src/etc/inc/interfaces.inc
+1
-1
system.inc
src/etc/inc/system.inc
+1
-1
vpn.inc
src/etc/inc/vpn.inc
+1
-1
configd
src/etc/rc.d/configd
+1
-1
rc.initial.firmware
src/etc/rc.initial.firmware
+5
-8
pkg_upgrade.sh
src/opnsense/scripts/pkg_upgrade.sh
+3
-9
configd.py
src/opnsense/service/configd.py
+1
-1
configd_ctl.py
src/opnsense/service/configd_ctl.py
+1
-1
execute_command.py
src/opnsense/service/execute_command.py
+1
-1
daemonize.py
src/opnsense/service/modules/daemonize.py
+1
-1
configctl
src/sbin/configctl
+4
-0
ovpn-linkdown
src/sbin/ovpn-linkdown
+1
-1
ovpn-linkup
src/sbin/ovpn-linkup
+2
-2
ppp-linkdown
src/sbin/ppp-linkdown
+1
-1
ppp-linkup
src/sbin/ppp-linkup
+4
-4
No files found.
src/etc/devd/carp.conf
View file @
cfcceaa1
...
...
@@ -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
"
;
};
src/etc/devd/ifnet.conf
View file @
cfcceaa1
...
...
@@ -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
"
;
};
#
...
...
src/etc/inc/gwlb.inc
View file @
cfcceaa1
...
...
@@ -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
}
...
...
src/etc/inc/interfaces.inc
View file @
cfcceaa1
...
...
@@ -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;
...
...
src/etc/inc/system.inc
View file @
cfcceaa1
...
...
@@ -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
);
...
...
src/etc/inc/vpn.inc
View file @
cfcceaa1
...
...
@@ -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
);
...
...
src/etc/rc.d/configd
View file @
cfcceaa1
...
...
@@ -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"
}
#
...
...
src/etc/rc.initial.firmware
View file @
cfcceaa1
...
...
@@ -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
src/opnsense/scripts/pkg_upgrade.sh
View file @
cfcceaa1
...
...
@@ -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
...
...
src/opnsense/service/configd.py
View file @
cfcceaa1
#!/usr/
local/bin/
python2.7
#!/usr/
bin/env
python2.7
"""
Copyright (c) 2014 Ad Schellevis
...
...
src/opnsense/service/configd_ctl.py
View file @
cfcceaa1
#!/usr/
local/bin/
python2.7
#!/usr/
bin/env
python2.7
"""
Copyright (c) 2015 Ad Schellevis
...
...
src/opnsense/service/execute_command.py
View file @
cfcceaa1
#!/usr/
local/bin/
python2.7
#!/usr/
bin/env
python2.7
"""
Copyright (c) 2014 Ad Schellevis
...
...
src/opnsense/service/modules/daemonize.py
View file @
cfcceaa1
#!/usr/bin/
python
#!/usr/bin/
env python2.7
# original source from https://github.com/thesharp/daemonize
...
...
src/sbin/configctl
0 → 100755
View file @
cfcceaa1
#!/bin/sh
# launch the real utility from here
/usr/local/opnsense/service/configd_ctl.py
"
${
@
}
"
src/sbin/ovpn-linkdown
View file @
cfcceaa1
...
...
@@ -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
src/sbin/ovpn-linkup
View file @
cfcceaa1
#!/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
src/sbin/ppp-linkdown
View file @
cfcceaa1
...
...
@@ -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
src/sbin/ppp-linkup
View file @
cfcceaa1
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment