[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1456-g2f0b1e5

James Turnbull james at lovedthanlost.net
Tue Oct 27 17:06:11 UTC 2009


The following commit has been merged in the upstream branch:
commit e2ce790b57723453ac8f52e17b6c56335b64036c
Author: Martin Englund <martin.englund at sun.com>
Date:   Tue Oct 20 11:41:07 2009 +0100

    Fixed #2737 - The zone provider needs to get acquainted with OpenSolaris

diff --git a/lib/puppet/provider/zone/solaris.rb b/lib/puppet/provider/zone/solaris.rb
index 778b9e0..52007bb 100644
--- a/lib/puppet/provider/zone/solaris.rb
+++ b/lib/puppet/provider/zone/solaris.rb
@@ -156,11 +156,16 @@ Puppet::Type.type(:zone).provide(:solaris) do
     def start
         # Check the sysidcfg stuff
         if cfg = @resource[:sysidcfg]
-            path = File.join(@resource[:path], "root", "etc", "sysidcfg")
+            zoneetc = File.join(@resource[:path], "root", "etc")
+            sysidcfg = File.join(zoneetc, "sysidcfg")
 
-            unless File.exists?(path)
+            # if the zone root isn't present "ready" the zone
+            # which makes zoneadmd mount the zone root
+            zoneadm :ready unless File.directory?(zoneetc)
+
+            unless File.exists?(sysidcfg)
                 begin
-                    File.open(path, "w", 0600) do |f|
+                    File.open(sysidcfg, "w", 0600) do |f|
                         f.puts cfg
                     end
                 rescue => detail
@@ -193,6 +198,10 @@ Puppet::Type.type(:zone).provide(:solaris) do
         main
     end
 
+    def ready
+        zoneadm :ready
+    end
+
     def stop
         zoneadm :halt
     end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list