summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-12-10 11:35:42 -0500
committerjim-p <jimp@pfsense.org>2014-12-10 11:35:42 -0500
commit3740e87e49a02d614f52b6553d5639edbe6db264 (patch)
tree50802ee2fecbb26169b9f1c1d468d101261f2ad7 /etc/rc
parente519371d09a6f42437400d71cdb36c6f6ba1bc29 (diff)
downloadpfsense-3740e87e49a02d614f52b6553d5639edbe6db264.zip
pfsense-3740e87e49a02d614f52b6553d5639edbe6db264.tar.gz
Setup ddb on all platforms. On full install it will save the dump, on NanoBSD it will print to console and auto-reboot.
This way, a router running NanoBSD won't sit at a db> prompt indefinitely if it crashes.
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index 60dcb34..601f3f3 100755
--- a/etc/rc
+++ b/etc/rc
@@ -31,6 +31,11 @@ if [ "$PLATFORM" = "pfSense" ]; then
/etc/rc.dumpon
fi
+# Setup ddb on all platforms. On full install it will save the dump, on NanoBSD it will print to console and auto-reboot.
+if [ ! -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
+ /sbin/ddb /etc/ddb.conf
+fi
+
if [ -e /root/force_fsck ]; then
echo "Forcing filesystem check..."
/sbin/fsck -y -t ufs /
OpenPOWER on IntegriCloud