summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-22 10:31:09 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-22 10:31:09 +0000
commit611e82f79cbf92ee22a4d6803e1eac45eb4469f3 (patch)
tree66c8b3f92bb49e469c4613ae9b5f1355ffecbb31
parent61f2acc35f7921cc7fc6584cd5e2879b1c2e15a6 (diff)
dahdi-perl: "allow" hand-editing of generated files
Rework the text added by dahdi_genconf generators to say that you can hand-edit files. But just don't complain if they get mysteriously overriden when it is run again :-) (closes issue #14569) Reported by: jtodd git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6215 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm4
-rw-r--r--xpp/perl_modules/Dahdi/Config/Gen/System.pm4
-rw-r--r--xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm4
-rw-r--r--xpp/perl_modules/Dahdi/Config/Gen/Users.pm2
4 files changed, 11 insertions, 3 deletions
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm b/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm
index 1f39a7a..8845544 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm
@@ -140,7 +140,9 @@ sub generate($) {
print "Generating $file\n" if $genopts->{verbose};
open(F, ">$file") || die "$0: Failed to open $file: $!\n";
my $old = select F;
- printf "; Autogenerated by %s on %s -- do not hand edit\n", $0, scalar(localtime);
+ printf "; Autogenerated by $0 on %s\n", scalar(localtime);
+ print "; If you edit this file and execute $0 again,\n";
+ print "; your manual changes will be LOST.\n";
print <<"HEAD";
; Dahdi Channels Configurations (chan_dahdi.conf)
;
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/System.pm b/xpp/perl_modules/Dahdi/Config/Gen/System.pm
index f805b65..6ec705f 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/System.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/System.pm
@@ -111,7 +111,9 @@ sub generate($$$) {
print "Generating $file\n" if $genopts->{verbose};
open(F, ">$file") || die "$0: Failed to open $file: $!\n";
my $old = select F;
- printf "# Autogenerated by %s on %s -- do not hand edit\n", $0, scalar(localtime);
+ printf "# Autogenerated by $0 on %s\n", scalar(localtime);
+ print "# If you edit this file and execute $0 again,\n";
+ print "# your manual changes will be LOST.\n";
print <<"HEAD";
# Dahdi Configuration File
#
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm b/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm
index 1a796f4..cb6bff0 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Unicall.pm
@@ -32,7 +32,9 @@ sub generate($) {
print "Generating $file\n" if $genopts->{verbose};
open(F, ">$file") || die "$0: Failed to open $file: $!\n";
my $old = select F;
- printf "; Autogenerated by %s on %s -- do not hand edit\n", $0, scalar(localtime);
+ printf "; Autogenerated by $0 on %s\n", scalar(localtime);
+ print "; If you edit this file and execute $0 again,\n";
+ print "; your manual changes will be LOST.\n";
print "; This file should be #included in unicall.conf\n\n";
foreach my $span (@spans) {
next unless $span->is_digital();
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Users.pm b/xpp/perl_modules/Dahdi/Config/Gen/Users.pm
index e9d8ab9..8bf5833 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Users.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Users.pm
@@ -88,6 +88,8 @@ sub generate($) {
;! Filename: @{[basename($file)]} ($file)
;! Generator: $0
;! Creation Date: @{[scalar(localtime)]}
+;! If you edit this file and execute $0 again,\n";
+;! your manual changes will be LOST.\n";
;!
[general]
;