summaryrefslogtreecommitdiffstats
path: root/etc/rc.backup_dhcpleases.sh
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-08-06 12:03:48 -0400
committerjim-p <jimp@pfsense.org>2010-08-06 12:03:48 -0400
commit6b5a20abe87cff8562c0789396631c1dc0651350 (patch)
tree38537432640317dcddd5f85bf3818d0f67b0fb5f /etc/rc.backup_dhcpleases.sh
parentef68d19ce1ec4c6f23c6e350340ccb7e6a2448d7 (diff)
downloadpfsense-6b5a20abe87cff8562c0789396631c1dc0651350.zip
pfsense-6b5a20abe87cff8562c0789396631c1dc0651350.tar.gz
Backup DHCP leases on NanoBSD too
Diffstat (limited to 'etc/rc.backup_dhcpleases.sh')
-rw-r--r--etc/rc.backup_dhcpleases.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/rc.backup_dhcpleases.sh b/etc/rc.backup_dhcpleases.sh
new file mode 100644
index 0000000..22cc219
--- /dev/null
+++ b/etc/rc.backup_dhcpleases.sh
@@ -0,0 +1,6 @@
+#!/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
OpenPOWER on IntegriCloud