Commit 45e043b1 authored by Franco Fichtner's avatar Franco Fichtner

rc: use rc.syshook for some for our important tasks

parent 23c2cce6
......@@ -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
......
......@@ -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+");
......
#!/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
#!/bin/sh
# Startup configd
/usr/local/etc/rc.d/configd start
#!/bin/sh
# Restore backups from previous shutdown
for BACKUP in captiveportal dhcpleases netflow rrd; do
/usr/local/etc/rc.backup_${BACKUP} restore
done
#!/bin/sh
# Backup volatile internals
for BACKUP in captiveportal dhcpleases netflow rrd; do
/usr/local/etc/rc.backup_${BACKUP} stop
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment