iankelling.org
/
git
/
cedit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ea4ea4b
)
handle zone file comments
author
Ian Kelling
<iank@fsf.org>
Sun, 10 Mar 2024 05:17:47 +0000
(
00:17
-0500)
committer
Ian Kelling
<iank@fsf.org>
Sun, 10 Mar 2024 05:17:47 +0000
(
00:17
-0500)
cedit
patch
|
blob
|
history
diff --git
a/cedit
b/cedit
index e6d373cde3907f5fb50663b23617f727525fe6e9..09d7b824df54f2c29075d7feb248804e70b34e64 100755
(executable)
--- a/
cedit
+++ b/
cedit
@@
-53,8
+53,15
@@
section. cedit is short for config edit.
local file="$1"
local file_name="${file##*/}"
local file="$1"
local file_name="${file##*/}"
- local begin="#_#_# start delimiter of cedit section$name. do not modify. #_#_#"
- local end="#_#_# end delimiter of cedit section$name. do not modify. #_#_#"
+ local comment
+ comment="#_#_#"
+
+ # bind zone files use ; for comments yes, a little hacky detection.
+ if [[ $file_name == db.* ]]; then
+ comment=";;_;_;"
+ fi
+ local begin="$comment start delimiter of cedit section$name. do not modify. $comment"
+ local end="$comment end delimiter of cedit section$name. do not modify. $comment"
if [[ ! -e $file_dir ]]; then
if ! mkdir -p $file_dir; then
if [[ ! -e $file_dir ]]; then
if ! mkdir -p $file_dir; then