On Sep 26, 2013, at 4:40 PM, Adrien Thebo <[email protected]> wrote:

> I'm coming in late here so please forgive me if someone has mentioned this, 
> but why don't we confine facts based on file extension or execute bit? 
> Windows doesn't respect the execute bit but uses file extensions, so if we 
> have 'exe' we run it, else not. On POSIX systems we just check if the file is 
> executable, and run the external fact if the file is executable. For YAML or 
> txt files, just check the extension and load them on both.


This is currently how facter works.  So, for windows it's actually not a 
problem.  It's a problem for unix systems because they would attempt to 
interpret an exe or com file using /bin/sh which would fail.  So, the latest 
proposal is to ignore common windows extensions on Linux.  The rest of the 
compatibility would be up to the programmer.  So if you've got a valid /bin/sh 
script running on multiple platforms.  The fact author would need to account 
for that somewhere at the beginning of his fact logic.

The YAML and txt extensions also currently work as you've stated.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to