--- a/bin/update Tue Mar 20 15:07:03 2012 +0200
+++ b/bin/update Wed Mar 21 16:45:59 2012 +0200
@@ -32,6 +32,9 @@
ZONES=zones
SERIALS=$DATA
+DHCP_DATA=$DATA/dhcp
+DHCP_HOSTS=dhcp
+
# hg repo to commit
REPO=$DATA
@@ -92,7 +95,7 @@
## Operate!
# these functions are all defined in lib/update.operations
-function run {
+function run_hosts {
## Hosts
# test
log "Testing hosts..."
@@ -113,7 +116,9 @@
# XXX: unsupported --forward-zone with pvl.txt
# update_hosts $ZONES/hosts/pvl $DATA/pvl.txt --forward-zone
copy_hosts $ZONES/hosts/pvl $DATA/pvl.txt
-
+}
+
+function run_zones {
## Includes
log "Copying zone includes..."
# view zone base
@@ -172,10 +177,12 @@
check_zone $view $zone $zone
done
done
+}
- ## Deploy
- log "Deploy zones..."
- deploy_zones
+function run_deploy {
+ ## Reload zones
+ log "Reload zones..."
+ reload_zones
## Commit
log "Commit data..."
@@ -199,7 +206,9 @@
done
## Go
- run
+ run_hosts
+ run_zones
+ run_deploy
}
main "$@"