Set alternatives for editor
[mirror/dsa-puppet.git] / modules / geodns / files / common / recvconf
index 36f9573..05419c9 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+#
+# THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+# USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+#
+
 set -e
 set -u
 
@@ -94,7 +99,14 @@ copy_and_runcommands() {
 
 IN=0
 linenum=0
+file=""
 nextfile=""
+
+clear_vars() {
+       perms=""; user=""; group=""; precommand=""; postcommand=""
+}
+clear_vars
+
 while read line; do
     linenum="$(($linenum + 1))"
 
@@ -120,7 +132,7 @@ while read line; do
        ## the file, then set a $file to the new value and continue parsing.
        [ -n "$file" ] && copy_and_runcommands "$file" "$perms" "$user" "$group" "$precommand" "$postcommand"
        file="$(printf "%s" "$line" | sed -e 's/[[:space:]]*file[[:space:]]\+\([^[:space:]#]*\).*/\1/')"
-       perms=""; user=""; group=""; precommand=""; postcommand=""
+       clear_vars
        continue
     fi