mvidner / donotedit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Do Not Edit" Notice Specification

Martin Vidner, SUSE

Version 1, January 2013

A Do-not-edit Notice can be found in the first dozen lines of a textual configuration file. The notice starts on the line containing the string DO NOT EDIT (without quotes) and ends with an empty line.

This notice will be simply displayed as a warning by a tool that helps the user edit the file. Obviously, one such tool is a text editor. The delimiters are present to assist other tools (for example YaST) which present the file in a more structured way.

In most formats of configuration files, the notice will need to be enclosed in a comment block. Stripping the comment delimiters is not addressed in this version of the specification.

Example, /etc/sysconfig/network/ifcfg-eth0

# DO NOT EDIT this file, it will be overwritten by Chef every 30 minutes.
# Instead, edit: git://git.example.com/intranet/ifcfg-eth0.template

STARTMODE=auto
BOOTPROTO=dhcp

Example dialog presented by YaST:

+--- Warning -------------------------------------------------------------+
|                                                                         |
| This module, Network Configuration, may need to modify the file         | 
| '/etc/sysconfig/network/ifcfg-eth0' which contains this notice:         |
|                                                                         |
| DO NOT EDIT this file, it will be overwritten by Chef every 30 minutes. |
| Instead, edit: git://git.example.com/intranet/ifcfg-eth0.template       |
|                                                                         |
|                    [Continue] [Cancel]                                  |
+-------------------------------------------------------------------------+

About