summaryrefslogtreecommitdiff
path: root/lib/chef/file_content_management
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-05-16 16:40:04 -0700
committersersut <serdar@opscode.com>2013-05-16 16:40:04 -0700
commit63dcbedc9999de20d5eb909f5a063b77655200ee (patch)
treef3a4e6d0eafd354b16ad1aece87372c22e6e7155 /lib/chef/file_content_management
parentd06e47888d80696f816f43e08c62568b5876af68 (diff)
downloadchef-63dcbedc9999de20d5eb909f5a063b77655200ee.tar.gz
Relocate comments so that they can be picked up correctly by the doc tools.
Diffstat (limited to 'lib/chef/file_content_management')
-rw-r--r--lib/chef/file_content_management/deploy/cp.rb6
-rw-r--r--lib/chef/file_content_management/deploy/mv_unix.rb15
2 files changed, 13 insertions, 8 deletions
diff --git a/lib/chef/file_content_management/deploy/cp.rb b/lib/chef/file_content_management/deploy/cp.rb
index 98ee54119c..c6b1d6cd11 100644
--- a/lib/chef/file_content_management/deploy/cp.rb
+++ b/lib/chef/file_content_management/deploy/cp.rb
@@ -26,6 +26,12 @@
class Chef
class FileContentManagement
class Deploy
+ #
+ # PURPOSE: This strategy preserves the inode, and will preserve modes + ownership
+ # even if the user running chef cannot create that ownership (but has
+ # rights to the file). It is vulnerable to crashes in the middle of
+ # writing the file which could result in corruption or zero-length files.
+ #
class Cp
def create(file)
Chef::Log.debug("touching #{file} to create it")
diff --git a/lib/chef/file_content_management/deploy/mv_unix.rb b/lib/chef/file_content_management/deploy/mv_unix.rb
index 548571eb1b..9baaa9906d 100644
--- a/lib/chef/file_content_management/deploy/mv_unix.rb
+++ b/lib/chef/file_content_management/deploy/mv_unix.rb
@@ -16,17 +16,16 @@
# limitations under the License.
#
-#
-# PURPOSE: this strategy is atomic, and attempts to preserve file modes
-#
-# NOTE: there is no preserve flag to FileUtils.mv, and we want to preserve the dst file
-# modes rather than the src file modes (preserve = true is what mv does already, we
-# would like preserve = false which is tricky).
-#
-
class Chef
class FileContentManagement
class Deploy
+ #
+ # PURPOSE: this strategy is atomic, and attempts to preserve file modes
+ #
+ # NOTE: there is no preserve flag to FileUtils.mv, and we want to preserve the dst file
+ # modes rather than the src file modes (preserve = true is what mv does already, we
+ # would like preserve = false which is tricky).
+ #
class MvUnix
def create(file)
# this is very simple, but it ensures that ownership and file modes take