瀏覽代碼
fix(osfamilymap): use `whoami` for Windows `rootuser`
Fix #495
tags/v1.8.1
Imran Iqbal
3 年之前
No account linked to committer's email address
共有
1 個文件被更改,包括
1 次插入 和
1 次删除
-
salt/osfamilymap.yaml
|
|
@@ -20,7 +20,7 @@ |
|
|
|
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %} |
|
|
|
{%- set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %} |
|
|
|
{%- elif grains.os_family == 'Windows' %} |
|
|
|
{%- set rootuser = salt['cmd.run']("id -un") %} |
|
|
|
{%- set rootuser = salt['cmd.run']("whoami").split("\\")[1] %} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|