-
modify
bin/puppet
wrapper- change
#!/usr/bin/env ruby
to#!/usr/bin/env ruby -E ISO-8859-1
- change
-
To test the Etc provider on OSX
- change
lib/puppet/provider/user/directoryservice.rb
, commenting the linedefaultfor :operatingsystem => :darwin
- change
lib/puppet/provider/user/useradd.rb
, commenting the linecommands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "chage"
- change
-
To perform some checks, mod
lib/puppet/util/character_encoding.rb
like:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | | |
Get-ItemProperty -name Version,Release -EA 0 | | |
Where { $_.PSChildName -match '^(?!S)\p{L}'} | | |
Select PSChildName, Version, Release, @{ | |
name="Product" | |
expression={ | |
switch -regex ($_.Release) { | |
"378389" { [Version]"4.5" } | |
"378675|378758" { [Version]"4.5.1" } | |
"379893" { [Version]"4.5.2" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$namedPipeName = 'dceb7903-d338-4207-938b-f5a1384dcfe8PuppetPsHost' | |
$client = New-Object System.IO.Pipes.NamedPipeClientStream($namedPipeName) | |
$client.Connect() | |
$code = @" | |
`$params = @{ | |
Code = @' | |
Start-Process powershell.exe | |
if (schtasks /query /fo csv 2> $null | ConvertFrom-Csv | Where-Object { $_.TaskName -eq "\wm\DSC\DSC Fact Collector" }) { exit 0;} else { exit 1; } | |
'@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rbconfig-AIO | |
# This file was created by mkconfig.rb when ruby was built. Any | |
# changes made to this file will be lost the next time ruby is built. | |
module RbConfig | |
RUBY_VERSION == "2.1.9" or | |
raise "ruby lib version (2.1.9) doesn't match executable version (#{RUBY_VERSION})" | |
TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/2.1.0/x64-mingw32") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
visit_Hash | |
visit_String | |
visit_Array | |
visit_Symbol | |
visit_Puppet_Type_Acl_Ace | |
visit_Hash | |
visit_String | |
visit_Symbol | |
visit_Time | |
Notice: Applied catalog in 0.67 seconds |
This chart has things broken down by Rubys response after calling chcp
locally.
Invalid codepage
means trying to change active codepage on English Windows 2008R2 is brokenRuby failure
indicates the inability of Ruby to even load given a codepage (though it did still properly identify the Ruby Encoding)- In most cases, Ruby considers the codepage
ASCII-8BIT
/BINARY
Name | Value |
---|---|
710 | Invalid codepage |
12001 | Invalid codepage |
So I thought that maybe this would be easy to do logged live into the system - turns out, not really
ssh root@libreelecip
pw: libreelec
Stop services once on host:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiddle/import' | |
require 'fiddle/types' | |
module Win32FiddleDirectories | |
extend Fiddle::Importer | |
include Fiddle::Win32Types # adds HWND, HANDLE, DWORD type aliases | |
# calling this appears to hose everything up! | |
# dlload "shell32", "kernel32" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h9ehp233a6ly3z9.delivery.puppetlabs.net (windows2012r2-64-1) 11:09:37$ cmd.exe /c puppet help --libdir="C:/cygwin64/tmp/7316_apps_should_be_available_via_pluginsync.s4Aakg/agent_lib" | |
Usage: puppet <subcommand> [options] <action> [options] | |
Available subcommands: | |
agent The puppet agent daemon | |
apply Apply Puppet manifests locally | |
ca Local Puppet Certificate Authority management. |