summaryrefslogtreecommitdiffstats
path: root/etc/rc.reboot
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-04-17 21:04:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-04-17 21:04:54 +0000
commitf921cfbb3867ee9be684fbc35e509c9cd85bd28f (patch)
tree443f42279108da9deeeaa6e6c8883198618850a4 /etc/rc.reboot
parentacdd8ddfacfa0fdc2274d55835c3aa73ca3ce43a (diff)
downloadpfsense-f921cfbb3867ee9be684fbc35e509c9cd85bd28f.zip
pfsense-f921cfbb3867ee9be684fbc35e509c9cd85bd28f.tar.gz
MFC 11520
Save the RRD files! MFC: Soon, testing with hoba now. Tickets:
Diffstat (limited to 'etc/rc.reboot')
-rwxr-xr-xetc/rc.reboot12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/rc.reboot b/etc/rc.reboot
index 7a213e7..868851d 100755
--- a/etc/rc.reboot
+++ b/etc/rc.reboot
@@ -9,5 +9,17 @@ fi
sleep 1
+# If PLATFORM is pfSense then remove
+# temporary files on shutdown from /tmp/
+PLATFORM=`cat /etc/platform`
+if [ "$PLATFORM" = "pfSense" ]; then
+ rm -rf /tmp/*
+else
+ # Save the rrd databases to the config path.
+ tar -czf /cf/conf/rrd.tgz /var/db/rrd/*.rrd
+fi
+
+sleep 1
+
/sbin/shutdown -r now
OpenPOWER on IntegriCloud