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
ce4bb4e7
Commit
ce4bb4e7
authored
Apr 25, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup: remove unused env var and add netflow script
parent
84416c71
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
upgrade_config.inc
src/etc/inc/upgrade_config.inc
+3
-4
rc
src/etc/rc
+3
-0
rc.backup_netflow
src/etc/rc.backup_netflow
+14
-0
rc.halt.common
src/etc/rc.halt.common
+1
-0
No files found.
src/etc/inc/upgrade_config.inc
View file @
ce4bb4e7
...
...
@@ -2125,8 +2125,7 @@ function upgrade_054_to_055()
enable_rrd_graphing
();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec
(
"cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
mwexec
(
'/bin/rm /var/db/rrd/*.xml'
);
exec
(
"cd /; LANG=C RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
if
(
file_exists
(
"/var/run/booting"
))
{
echo
"Updating configuration..."
;
}
...
...
@@ -2790,7 +2789,7 @@ function upgrade_080_to_081()
enable_rrd_graphing
();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec
(
"cd /; LANG=C
NO_REMOUNT=1
RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
exec
(
"cd /; LANG=C RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
if
(
file_exists
(
"/var/run/booting"
))
echo
"Updating configuration..."
;
foreach
(
$config
[
'filter'
][
'rule'
]
as
&
$rule
)
{
...
...
@@ -3096,7 +3095,7 @@ function upgrade_095_to_096()
enable_rrd_graphing
();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec
(
"cd /; LANG=C
NO_REMOUNT=1
RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
exec
(
"cd /; LANG=C RRDDBPATH='
{
$rrddbpath
}
' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"
);
}
function
upgrade_096_to_097
()
...
...
src/etc/rc
View file @
ce4bb4e7
...
...
@@ -184,6 +184,9 @@ echo "done."
# Execute the early syshook / plugin commands
/usr/local/etc/rc.syshook early
# Restore backups from previous shutdown (if any)
/usr/local/etc/rc.backup_netflow restore
# let the PHP-based configuration subsystem set up the system now
echo
-n
"Launching the init system..."
rm
-f
/root/lighttpd
*
...
...
src/etc/rc.backup_netflow
0 → 100755
View file @
ce4bb4e7
#!/bin/sh
BACKUPFILE
=
"/conf/netflow.tgz"
BACKUPDIR
=
"/var/netflow"
if
[
"
${
1
}
"
==
"restore"
]
;
then
if
[
-f
"
${
BACKUPFILE
}
"
]
;
then
tar
-C
/
-xzf
"
${
BACKUPFILE
}
"
fi
else
if
[
-d
"
${
BACKUPDIR
}
"
]
;
then
tar
-C
/
-czf
"
${
BACKUPFILE
}
"
"
${
BACKUPDIR
}
"
fi
fi
src/etc/rc.halt.common
View file @
ce4bb4e7
...
...
@@ -11,6 +11,7 @@
# backup volatile internals
/usr/local/etc/rc.backup_dhcpleases
/usr/local/etc/rc.backup_netflow
/usr/local/etc/rc.backup_rrd
# wait for config lock to release
...
...
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