prosodyctl: about: Report the current operating system according to uname
authorKim Alvefur <zash@zash.se>
Sat, 08 Dec 2018 18:02:56 +0100
changeset 9830 bdc2a024933b
parent 9829 5ccce16c6449
child 9833 fdc42f685557
prosodyctl: about: Report the current operating system according to uname
prosodyctl
--- a/prosodyctl	Sat Feb 09 20:54:35 2019 +0100
+++ b/prosodyctl	Sat Dec 08 18:02:56 2018 +0100
@@ -363,6 +363,13 @@
 				.."\n  ";
 		end)));
 	print("");
+	local have_pposix, pposix = pcall(require, "util.pposix");
+	if have_pposix and pposix.uname then
+		print("# Operating system");
+		local uname, err = pposix.uname();
+		print(uname and uname.sysname .. " " .. uname.release or "Unknown POSIX", err or "");
+		print("");
+	end
 	print("# Lua environment");
 	print("Lua version:             ", _G._VERSION);
 	print("");