summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.backup_dhcpleases.sh8
-rwxr-xr-xetc/rc.backup_rrd.sh8
2 files changed, 10 insertions, 6 deletions
diff --git a/etc/rc.backup_dhcpleases.sh b/etc/rc.backup_dhcpleases.sh
index 22cc219..73f83a8 100755
--- a/etc/rc.backup_dhcpleases.sh
+++ b/etc/rc.backup_dhcpleases.sh
@@ -1,6 +1,8 @@
#!/bin/sh
# Save the DHCP lease database to the config path.
-/etc/rc.conf_mount_rw
-cd / && tar -czf /cf/conf/dhcpleases.tgz -C / var/dhcpd/var/db/
-/etc/rc.conf_mount_ro
+if [ -d "/var/dhcpd/var/db" ]; then
+ /etc/rc.conf_mount_rw
+ cd / && tar -czf /cf/conf/dhcpleases.tgz -C / var/dhcpd/var/db/
+ /etc/rc.conf_mount_ro
+fi
diff --git a/etc/rc.backup_rrd.sh b/etc/rc.backup_rrd.sh
index 2e93b64..b39578d 100755
--- a/etc/rc.backup_rrd.sh
+++ b/etc/rc.backup_rrd.sh
@@ -1,6 +1,8 @@
#!/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
+if [ -d "/var/db/rrd" ]; then
+ /etc/rc.conf_mount_rw
+ cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
+ /etc/rc.conf_mount_ro
+fi
OpenPOWER on IntegriCloud