equal
deleted
inserted
replaced
20 platform = "Windows"; |
20 platform = "Windows"; |
21 else |
21 else |
22 local os_version_command = module:get_option_string("os_version_command"); |
22 local os_version_command = module:get_option_string("os_version_command"); |
23 local ok, pposix = pcall(require, "prosody.util.pposix"); |
23 local ok, pposix = pcall(require, "prosody.util.pposix"); |
24 if not os_version_command and (ok and pposix and pposix.uname) then |
24 if not os_version_command and (ok and pposix and pposix.uname) then |
25 local ok, uname = pposix.uname(); |
25 local uname, err = pposix.uname(); |
26 if not ok then |
26 if not uname then |
27 module:log("debug", "Could not retrieve OS name: %s", uname); |
27 module:log("debug", "Could not retrieve OS name: %s", err); |
28 else |
28 else |
29 platform = uname.sysname; |
29 platform = uname.sysname; |
30 end |
30 end |
31 end |
31 end |
32 if not platform then |
32 if not platform then |