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
45e043b1
Commit
45e043b1
authored
May 09, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: use rc.syshook for some for our important tasks
parent
23c2cce6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
21 deletions
+30
-21
plist
plist
+4
-0
rc
src/etc/rc
+0
-16
rc.shutdown
src/etc/rc.shutdown
+0
-5
05-update.early
src/etc/rc.syshook.d/05-update.early
+9
-0
10-configd.early
src/etc/rc.syshook.d/10-configd.early
+4
-0
20-backup.early
src/etc/rc.syshook.d/20-backup.early
+6
-0
90-backup.stop
src/etc/rc.syshook.d/90-backup.stop
+7
-0
No files found.
plist
View file @
45e043b1
...
...
@@ -132,8 +132,12 @@
/usr/local/etc/rc.sshd
/usr/local/etc/rc.syshook
/usr/local/etc/rc.syshook.d/05-beep.stop
/usr/local/etc/rc.syshook.d/05-update.early
/usr/local/etc/rc.syshook.d/10-configd.early
/usr/local/etc/rc.syshook.d/20-backup.early
/usr/local/etc/rc.syshook.d/20-freebsd.start
/usr/local/etc/rc.syshook.d/80-freebsd.stop
/usr/local/etc/rc.syshook.d/90-backup.stop
/usr/local/etc/rc.syshook.d/90-carp.start
/usr/local/etc/rc.syshook.d/90-cron.start
/usr/local/etc/rc.syshook.d/95-beep.start
...
...
src/etc/rc
View file @
45e043b1
...
...
@@ -227,22 +227,6 @@ echo "done."
# Recreate capabilities DB
/usr/bin/cap_mkdb /etc/login.conf
# Perform major updates
for
STAGE
in
B P
;
do
if
opnsense-update -
${
STAGE
}
;
then
# ideally reroot with `-r', but panics on ZFS
reboot
fi
done
# Startup configd
/usr/local/etc/rc.d/configd start
# Restore backups from previous shutdown
for
BACKUP
in
captiveportal dhcpleases netflow rrd
;
do
/usr/local/etc/rc.backup_
${
BACKUP
}
restore
done
# Execute the early syshook / plugin commands
/usr/local/etc/rc.syshook early
...
...
src/etc/rc.shutdown
View file @
45e043b1
...
...
@@ -3,11 +3,6 @@
# shutdown syshook / plugin scripts
/usr/local/etc/rc.syshook stop
# backup volatile internals
for
BACKUP
in
captiveportal dhcpleases netflow rrd
;
do
/usr/local/etc/rc.backup_
${
BACKUP
}
stop
done
# wait for config lock to release
php
-a
>
/dev/null
<<
EOF
\$
fp = fopen('/conf/config.xml', "a+");
...
...
src/etc/rc.syshook.d/05-update.early
0 → 100755
View file @
45e043b1
#!/bin/sh
# Perform major updates
for
STAGE
in
B P
;
do
if
opnsense-update -
${
STAGE
}
;
then
# ideally reroot with `-r', but panics on ZFS
reboot
fi
done
src/etc/rc.syshook.d/10-configd.early
0 → 100755
View file @
45e043b1
#!/bin/sh
# Startup configd
/usr/local/etc/rc.d/configd start
src/etc/rc.syshook.d/20-backup.early
0 → 100755
View file @
45e043b1
#!/bin/sh
# Restore backups from previous shutdown
for
BACKUP
in
captiveportal dhcpleases netflow rrd
;
do
/usr/local/etc/rc.backup_
${
BACKUP
}
restore
done
src/etc/rc.syshook.d/90-backup.stop
0 → 100755
View file @
45e043b1
#!/bin/sh
# Backup volatile internals
for
BACKUP
in
captiveportal dhcpleases netflow rrd
;
do
/usr/local/etc/rc.backup_
${
BACKUP
}
stop
done
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