From b9ff7e59536af6b4d4f5203636ed4dadb83d9897 Mon Sep 17 00:00:00 2001
From: mwiegand <mwiegand@seibert-media.net>
Date: Wed, 1 Jun 2022 11:34:12 +0200
Subject: [PATCH] manage global zprofile

---
 bundles/zsh/files/zprofile | 9 +++++++++
 bundles/zsh/items.py       | 4 ++++
 2 files changed, 13 insertions(+)
 create mode 100644 bundles/zsh/files/zprofile

diff --git a/bundles/zsh/files/zprofile b/bundles/zsh/files/zprofile
new file mode 100644
index 0000000..1a2e1e1
--- /dev/null
+++ b/bundles/zsh/files/zprofile
@@ -0,0 +1,9 @@
+# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
+#
+# This file is sourced only for login shells (i.e. shells
+# invoked with "-" as the first character of argv[0], and
+# shells invoked with the -l flag.)
+#
+# Global Order: zshenv, zprofile, zshrc, zlogin
+
+alias s='sudo su - root -s /usr/bin/zsh'
diff --git a/bundles/zsh/items.py b/bundles/zsh/items.py
index 6829bdc..30629d4 100644
--- a/bundles/zsh/items.py
+++ b/bundles/zsh/items.py
@@ -1,5 +1,9 @@
 from os.path import join
 
+files = {
+    '/etc/zsh/zprofile': {},
+}
+
 for name, user_config in node.metadata.get('users').items():
     if user_config.get('shell', None) != '/usr/bin/zsh':
         continue