mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
rc: use rc.syshook for some for our important tasks
This commit is contained in:
parent
23c2cce667
commit
45e043b103
4
plist
4
plist
@ -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
|
||||
|
||||
16
src/etc/rc
16
src/etc/rc
@ -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
|
||||
|
||||
|
||||
@ -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+");
|
||||
|
||||
9
src/etc/rc.syshook.d/05-update.early
Executable file
9
src/etc/rc.syshook.d/05-update.early
Executable file
@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
4
src/etc/rc.syshook.d/10-configd.early
Executable file
4
src/etc/rc.syshook.d/10-configd.early
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Startup configd
|
||||
/usr/local/etc/rc.d/configd start
|
||||
6
src/etc/rc.syshook.d/20-backup.early
Executable file
6
src/etc/rc.syshook.d/20-backup.early
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Restore backups from previous shutdown
|
||||
for BACKUP in captiveportal dhcpleases netflow rrd; do
|
||||
/usr/local/etc/rc.backup_${BACKUP} restore
|
||||
done
|
||||
7
src/etc/rc.syshook.d/90-backup.stop
Executable file
7
src/etc/rc.syshook.d/90-backup.stop
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Backup volatile internals
|
||||
for BACKUP in captiveportal dhcpleases netflow rrd; do
|
||||
/usr/local/etc/rc.backup_${BACKUP} stop
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user