diff --git a/etc/rc.reboot b/etc/rc.reboot index 7a213e7f66..868851dd6a 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