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
a6132af6
Commit
a6132af6
authored
May 27, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: start to dump and restore package dabase
PR:
https://forum.opnsense.org/index.php?topic=3082.0
parent
b0250b97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
rc
src/etc/rc
+11
-6
rc.halt.common
src/etc/rc.halt.common
+3
-0
No files found.
src/etc/rc
View file @
a6132af6
...
...
@@ -202,26 +202,31 @@ fi
echo
"done."
# restore pkg database if bootstrapped
if
[
-f
/conf/pkg.db
]
;
then
if
pkg
-N
;
then
pkg backup
-qr
/conf/pkg.db
;
fi
fi
# regenerate groups and users for packages
/usr/local/etc/rc.recover pkg
>
/dev/null
# Recreate capabilities DB
/usr/bin/cap_mkdb /etc/login.conf
# Set up the correct php.ini content
/usr/local/etc/rc.php_ini_setup
# startup configd
/usr/local/etc/rc.d/configd start
# Execute the early syshook / plugin commands
/usr/local/etc/rc.syshook early
# Restore backups from previous shutdown (if any)
/usr/local/etc/rc.backup_dhcpleases restore
/usr/local/etc/rc.backup_netflow restore
/usr/local/etc/rc.backup_rrd restore
# Set up the correct php.ini content
/usr/local/etc/rc.php_ini_setup
# Execute the early syshook / plugin commands
/usr/local/etc/rc.syshook early
# let the PHP-based configuration subsystem set up the system now
echo
-n
"Launching the init system..."
rm
-f
/root/lighttpd
*
...
...
src/etc/rc.halt.common
View file @
a6132af6
...
...
@@ -14,6 +14,9 @@
/usr/local/etc/rc.backup_netflow
/usr/local/etc/rc.backup_rrd
# dump pkg database if bootstrapped
if
pkg
-N
;
then
pkg backup
-qd
/conf/pkg.db
;
fi
# wait for config lock to release
php
-a
>
/dev/null
<<
EOF
\$
fp = fopen('/conf/config.xml', "a+");
...
...
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