summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/rc.backup_rrd.sh6
-rwxr-xr-xetc/rc.reboot5
-rwxr-xr-xetc/rc.shutdown5
3 files changed, 8 insertions, 8 deletions
diff --git a/etc/rc.backup_rrd.sh b/etc/rc.backup_rrd.sh
new file mode 100644
index 0000000..2e93b64
--- /dev/null
+++ b/etc/rc.backup_rrd.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Save the rrd databases to the config path.
+/etc/rc.conf_mount_rw
+cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
+/etc/rc.conf_mount_ro
diff --git a/etc/rc.reboot b/etc/rc.reboot
index 66efae4..ff5a5fc 100755
--- a/etc/rc.reboot
+++ b/etc/rc.reboot
@@ -15,10 +15,7 @@ PLATFORM=`cat /etc/platform`
if [ "$PLATFORM" = "pfSense" ]; then
rm -rf /tmp/*
else
- /etc/rc.conf_mount_rw
- # Save the rrd databases to the config path.
- cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
- /etc/rc.conf_mount_ro
+ /etc/rc.backup_rrd.sh
fi
sleep 1
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
index f6175b4..7d4d32f 100755
--- a/etc/rc.shutdown
+++ b/etc/rc.shutdown
@@ -30,8 +30,5 @@ PLATFORM=`cat /etc/platform`
if [ "$PLATFORM" = "pfSense" ]; then
rm -rf /tmp/*
else
- /etc/rc.conf_mount_rw
- # Save the rrd databases to the config path.
- cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
- /etc/rc.conf_mount_ro
+ /etc/rc.backup_rrd.sh
fi
OpenPOWER on IntegriCloud